Building predictive Model with Ibis, Impala and scikit-learn

Aki Ariga
Democratizing Data
Published in
2 min readOct 15, 2016

tl;dr

  • visualizing MovieLens 20M data (famous movie rating data) with Ibis
  • build predictive model for movie favor with scikit-learn
  • repo / notebook

What is Ibis?

Ibis is a bridge between Python and Big Data. Ibis enables pandas handling Big Data.

architecture of Ibis

For more detail, see Wes’s presentation.

As you know, pandas is known as a killer application for data analysis. In my previous job, which is known as a developer of world largest monolithic Ruby on Rails application, many Rails developer attracted with pandas and Jupyter notebook for sharing analysis result.

Why Ibis?

pandas loads data on memory, so we have to filter with some SQL before analyzing. But we actually want to get insight and handle without SQL.

Preparation

Impala cluster

  • CDH 5.7 with Cloudera Director 2.1
  • table is created with parquet on S3

required port

  • impalad node’s 21050 port
  • NN’s 50070 port

Ibis

  • Python 3.5
  • using wheel and virtualenv, I didn’t use anaconda

Notebook

Full notebook repo is here. I also executed same code for Redshift, but several dialects prevent execution…

FAQ

What is the difference between PySpark?

  • Easy to setup. It is just like connecting DB
  • Fast x10. So that we can x10 experiences. It makes us innovations!
  • We can rapid prototyping with Ibis.

Which is prefer to build model Ibis + scikit-learn or Spark + MLlib?

--

--

Aki Ariga
Democratizing Data

ML Engineer at Arm Treasure Data. Previously Cloudera. Love machine learning, data analysis, Ruby and Python.