introduce to predictionio

28
Prediction IO 2016/06/01 (Wed.) @ Exma-Square Meeting WeiYuan(@v123582)

Upload: wei-yuan-chang

Post on 21-Apr-2017

319 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Page 1: Introduce to PredictionIO

Prediction IO2016/06/01 (Wed.) @ Exma-Square MeetingWeiYuan(@v123582)

Page 2: Introduce to PredictionIO

Outline § the future of Picklete§ Recommendation§ PredcitonIO§ how to start ?§ how to use ?

2

Page 3: Introduce to PredictionIO

the future of Picklete

Page 4: Introduce to PredictionIO

4

Picklete

Page 5: Introduce to PredictionIO

5

Picklete

Page 6: Introduce to PredictionIO

Recommendation

Page 7: Introduce to PredictionIO

Recommendation § Personalized recommendation

§ Collaborative filtering

7

Page 8: Introduce to PredictionIO
Page 9: Introduce to PredictionIO

PredcitonIO

Page 10: Introduce to PredictionIO

ML as a ServicesIntegrate everything of ML together nicely and move from prototyping to production

10

Page 11: Introduce to PredictionIO

PredcitonIO Open Source

§ open source framework§ for developers and data

scientists§ querying via restful API

Machine Learning

§ event collection§ algorithms deployment§ evaluation

11

Page 12: Introduce to PredictionIO

Overview

12

Page 13: Introduce to PredictionIO

DASE§ Data Sources§ Algorithm§ Serving§ Evaluation

13

Page 14: Introduce to PredictionIO

DASE§ Data Sources§ Algorithm§ Serving§ Evaluation

14

Page 15: Introduce to PredictionIO

Arch.§ Spark§ Mlib§ HBase§ HDFS§ Hadoop

15

Page 16: Introduce to PredictionIO

how to start ?

Page 17: Introduce to PredictionIO

Prerequisites § Apache Hadoop 2.4.0§ Apache Spark 1.3.0 for Hadoop 2.4§ Java SE Development Kit 7§ MySQL 5.1

17

Page 18: Introduce to PredictionIO

Installation

§ Quick Install

§ status

12$ bash -c "$(curl -s https://install.prediction.io/install.sh)"$ PATH=$PATH:/home/yourname/PredictionIO/bin; export PATH

12345

$ pio status

### Return:…[INFO] [Console$] Your system is all ready to go.18

Page 19: Introduce to PredictionIO

how to use ?

Page 20: Introduce to PredictionIO

Step 1

§ Run PredictionIO1 $ pio eventserver &

20

Page 21: Introduce to PredictionIO

Step 2

§ Create a new Engine from an Engine Template

use Universal Recommender for example

1 $ pio template get <template-repo-path> ./<your-app-directory>

21

Page 22: Introduce to PredictionIO

Step 3

§ Generate an App ID and Access Key1234567

$ cd MyRecommendation$ pio app new MyRecommendation

### Return:…[INFO] [App$] ID: 1 [INFO] [App$] Access Key: ...

22

Page 23: Introduce to PredictionIO

Step 4

§ Collecting Data

§ Sample Data

12$ curl <sample_data> --create-dirs -o data/<sample_data>$ python data/import_eventserver.py --access_key <access-key>

./data/<sample_data>1234

0::2::30::3::13::9::46::9::1

23

Page 24: Introduce to PredictionIO

Step 5

§ Deploy the Engine as a Service./Engine.json1234567

… "datasource": {"params" : {

"appName": MyRecommendation}

},…

24

Page 25: Introduce to PredictionIO

Step 5

§ Bulid and Training the Predictive Model123456789

$ pio build### Return:…[INFO] [Console$] Your engine is ready for training.

$ pio train### Return:…[INFO] [CoreWorkflow$] Training completed successfully.25

Page 26: Introduce to PredictionIO

Step 5

§ Bulid and Training the Predictive Model12345

$ pio deploy### Return:…[INFO] [HttpListener] Bound to /0.0.0.0:8000 [INFO] [MasterActor] Bind successful. Ready to serve.

26

Page 27: Introduce to PredictionIO

Step 6

§ Use the Engine123456789

$ curl -d '{ "user": "1", "num": 2 }'/ http://localhost:8000/queries.json

### Return:{ "itemScores”: [

{ "item":"22", "score":4.072304374729956},{ "item":"62", "score":4.058482414005789},

]}27

Page 28: Introduce to PredictionIO

Thanks for listening.2016/06/01 (Wed.) @ Exma-SquareWeiYuan(@v123582)v123582.github.io