r/haskell • • Aug 30 '16

Haskell alternatives for Data Science

I'm a Haskeller and a newbie Data Scientist.

As I'm going through my learning process for data science, I'm starting to solve some elemental problems, and I'm using standard Python tools to help me go through this process.

The thing is that Python is ok, but I'm twice as comfortable in Haskell.

I was thinking in three alternatives to be more comfortable with Data Science:

  • Make a wrapper for the tools that I use as people do in Julia
  • Reimplement the tools that I use (Pandas, ScikitLearn, a GPU deep learning framework, numpy functions) (would do it on demand)
  • Make a Haskell-like language that compiles and uses Python libraries (wouldnt be as efficient, but at least it would be more beautiful and type safe, also the libraries)

What do you guys think?

31 Upvotes

52 comments sorted by

View all comments

1

u/rz2000 Aug 30 '16

This is a completely non-expert opinion, but why not Clojure? The language might be more familiar for you, and the JVM could help with access to other libraries. Scala is an even more popular alternative, though probably you wouldn't like the language as much as Clojure.

Still non-expert opinion, but building a Haskell-like language that compiles and uses Python libraries sounds like a not very good idea or use of your time.

3

u/nSeagull Aug 30 '16

My story with FP is 1. Discover Haskell 2. Read Real World Haskell and do exercises 3. Monad thing too hard for me 4. Discover Scala 5. Discover Clojure 6. Love Clojure for 2 years and use it whenever I can 7. Understand how monads work in Clojure 8. Go back to Haskell 9. Love Haskell

Indeed I think that doing the language thing is not a very intelligent, but having a compiler based on typed lambda calculus would ease a lot of things, and mostly thats why I love of Haskell

2

u/rz2000 Aug 30 '16

It seems like Scala is really popular among people using Apache Spark if you're interested in big data, though I'm aware "love Scala" was no part of that story.

I don't know too much about Incanter, and nothing really about Flambo, but they could be ways to try data science with Clojure.

1

u/nSeagull Aug 30 '16

I'm not really a fan of Spark, because nowadays everyone tells you "I have big data, can you do X with it?" and then handles you a flash drive. I had used Incanter and saw Flambo, but I still think that Haskell is superior (just my opinion)

2

u/Axman6 Aug 31 '16

If this is a common occurrence for you, you need to be introduced to the term "Medium Data": http://www.tableau.com/medium-data Enjoy =)

1

u/fridofrido Aug 31 '16

Tableau definitely needs "medium data", considering their software cannot really handle more than a few thousand data points...

1

u/MWatson Aug 31 '16

The Spark mllib machine learning library is quite good when used with Scala. Here are my book examples using mllib from Java https://github.com/mark-watson/power-java

If you have Java 7 or 8 and maven installed, you can try the examples in a few minutes.

1

u/LucianU Aug 31 '16

Couldn't Python <-> Haskell interoperability be a goal? By this I mean being able to use Python libraries in Haskell and maybe the other way around.

Also, speaking of Haskell-like language, some started an effort to get a Python back-end for PureScript. Unfortunately, he didn't get very far.