I am a professional java developer with 9 years of experience. Never worked with Python but, I do not have any restraints learning it.

Still I need clarity on a couple of aspects. I hope if anyone can help, it will clear the cobwebs in my mind. I am looking to develop a machine learning project :

  • With a web interface to present interactive analytical graphs and views.
  • Employing a web crawler collecting data, both structured and unstructured.
  • A backend crunching the data collected using machine learning and artificial intelligence and natural language processing algorithms.

While exploring options available, I found both Python and Java have extensive support and frameworks/libraries/modules available to leverage machine learning implementations.

However, working with Java gives me a sense of strongly typed programming and it can leverage the underlying CPU cores via its robust multi-threading APIs. Python on the other hand is scripted language and on the face value looks to lesser efficient when working on complex logic crunching a huge amount of data pertaining to Natural Language Processing.

I might be utterly wrong as I am not very acquainted with Python ecosystem.

Can anyone help me understand on the choice between Java and Python if I keep in mind execution speed, maintainability and community support targeted toward development of a large, scalable and robust machine learning/artificially intelligent application ?


2 Answers 2


I work with python and java in big-data settings every day.

python is definitely my language of choice when researching, experimenting and fitting models. python has a ton of very useful libraries such as spacy, nltk and sklearn that makes exploration very easy, especially in within a jupyter notebook.

When running the code in production, If performance is a consideration, we implement only the prediction phase in java.

java is more suited for production, has great support for packaging, tests, deployment.

  • $\begingroup$ Thanks Uri ... using Java for prediction phase was a sort of specific input I was looking for. More inputs are welcome if you get any more ideas or inputs around this query. $\endgroup$
    – Animesh
    Oct 3, 2017 at 8:28

Data intensity is a critical factor, but that factor alone is not sufficient to choose a programming language. Please go through this article from your use case perspective and you can more easily evaluate Python with Java: https://togglebrains.wordpress.com/2017/11/05/select-programming-language-for-machine-learning/


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.