scikit-learn: machine learning in Python.
There, right there is your first hurdle. Where would you find such a library for Java? (Hint, that's your work to do now.)
In the future please use
discussion/question (the default) for threads like this one.
Code Snippet is reserved for sharing working, and hopefully well documented code with others.