# OCaml for Data Science

**URL:** <https://discuss.ocaml.org/t/ocaml-for-data-science/1878>\
**Category:** Ecosystem\
**Tags:** machine-learning, data-science, statistics\
**Created:** [April 17, 2018, 11:56pm UTC](https://discuss.ocaml.org/t/ocaml-for-data-science/1878 "2018-04-17T23:56:36Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![akabe](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/akabe/32/964_2.png) [@akabe](https://discuss.ocaml.org/u/akabe)\
**Post date:** [April 25, 2018, 1:44am UTC](https://discuss.ocaml.org/t/ocaml-for-data-science/1878/14 "2018-04-25T01:44:42Z")

</div>

Hi. Sorry for late reply. I’m using OCaml for data science at work.

> What makes OCaml good/bad for data science (long story short of your experience with OCaml in this area)?

- (Good) OCaml is fast.
- (Good) Static typing prevents many small bugs. For example, Python often shows me errors like not found key in dict after long-time computation, but OCaml finds them in compile time (when we use records).
- (Bad) OCaml Libraries for machine learning are less than Python.
- (Bad) OCaml cannot support multicore.

> What the OCaml alternatives for Python’s Pandas, NumPy, SciPy, etc.?

As some people mentioned, owl is similar to numpy.

> Do you know some frontier companies/products/projects that uses OCaml for data science?

I don’t know. I use OCaml for data science personally. However, my colleagues use their favorite languages, e.g., Java, Python, etc.

> Is there any problems that are related to data science and was solved by other platforms, but not by OCaml as a platform?

Lack of libraries, multi-core support and scalable distributed-memory processing environments (I know some opam packages such as rpc\_parallel, but I cannot find enough examples).

> Maybe you may give me a good piece advise related to both OCaml and data science.

Jupyter ([http://jupyter.org/](http://jupyter.org/)) is very useful and it can execute OCaml code: [OCaml Jupyter | An OCaml kernel for Jupyter notebook](https://akabe.github.io/ocaml-jupyter/). A Docker image containing many packages for data science is available: [GitHub - akabe/docker-ocaml-jupyter-datascience: Dockerfiles for data science in OCaml on Jupyter](https://github.com/akabe/docker-ocaml-jupyter-datascience), and some examples are at [docker-ocaml-jupyter-datascience/notebooks at master · akabe/docker-ocaml-jupyter-datascience · GitHub](https://github.com/akabe/docker-ocaml-jupyter-datascience/tree/master/notebooks).  
Please try them, if you are interested.

---

_[View the full topic](https://discuss.ocaml.org/t/ocaml-for-data-science/1878)._
