* add back train method but mark as deprecated * fix scalastyle error * change class to object in examples * fix compilation error * fix mis configuration