Slide 1

Slide 1 text

Machine Learning with Node.js and PredictionIO

Slide 2

Slide 2 text

Tomorrow is a holiday so give me a TV show to binge watch!

Slide 3

Slide 3 text

Florian Eckerstorfer Developer in Vienna Vienna.js, 30 April 2014

Slide 4

Slide 4 text

Machine Learning Prediction.io Demo 1 2 3

Slide 5

Slide 5 text

Machine Learning 1

Slide 6

Slide 6 text

Machine learning, a branch of artificial intelligence, concerns the construction and study of systems that can learn from data. wikipedia.org/wiki/Machine_learning

Slide 7

Slide 7 text

Classification

Slide 8

Slide 8 text

Name Creator Network Episode Length Genre The Sopranos David Chase HBO 60 Drama Weeds Jenji Kohan Showtime 30 Comedy Girls Lena Dunham HBO 30 Comedy Orange Is The New Black Jenji Koahn Netflix 30 ?

Slide 9

Slide 9 text

S S S S S S S S S S S S S S S S S S 1. Training

Slide 10

Slide 10 text

2. Generalisation S S S S S S S S S

Slide 11

Slide 11 text

3. Pattern Matching S ? S

Slide 12

Slide 12 text

k-nearest neighbours

Slide 13

Slide 13 text

kNN

Slide 14

Slide 14 text

1 1 2 k=3

Slide 15

Slide 15 text

1 1 2 k=5 2 3

Slide 16

Slide 16 text

k-Nearest Neighbours Decision Trees Support Vector Machines Neural Networks Bayesian Networks

Slide 17

Slide 17 text

Trade Offs Time Memory Accuracy Algorithm vs. Problem

Slide 18

Slide 18 text

PredictionIO 2

Slide 19

Slide 19 text

Machine Learning Server

Slide 20

Slide 20 text

Scala MongoDB Hadoop Apache Mahout

Slide 21

Slide 21 text

PredictionIO Server Admin Web UI Admin Server Engine A Engine B Algorithm X Algorithm Y Algorithm S Algorithm T Workflow Scheduler MapReduce Engine Hadoop Distributed File System Predictive Model Storage Databases REST API Servers SDK SDK Web App Mobile App Ω Ω

Slide 22

Slide 22 text

And now in Node.js

Slide 23

Slide 23 text

predictionio-client npm install

Slide 24

Slide 24 text

var p = require(‘predictionio-client') p.config.APP_KEY = ‘…’; p.config.APP_URL = ‘http://localhost:8000'; p.user.createUser(‘florian’, function() {}); p.item.createItem(‘game of thrones’, 'show', function () {}); p.action.like(‘florian’, ‘game of thrones’, function() {}); p.engine.recommendedItems('itemrec', ‘florian’, 5, function (a,data) { console.log(data); });

Slide 25

Slide 25 text

Demo 3

Slide 26

Slide 26 text

github.com/florianeckerstorfer/viennajs-predictionio or shrt.at/1tP

Slide 27

Slide 27 text

PredictionIO. prediction.io PredictionIO-NodeJS-Client. github.com/ kostyantyn/PredictionIO-NodeJS-Client PredictionIO on Vagrant. docs.prediction.io/ current/installation/install-predictionio-with- virtualbox-vagrant.html Tom Mitchell. Machine Learning, McGraw Hill, 1997

Slide 28

Slide 28 text

Florian Eckerstorfer [email protected] http://florian.ec @Florian_

Slide 29

Slide 29 text

Questions?