introduce to predictionio

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

Upload: wei-yuan-chang

Post on 09-Feb-2017

286 views

Category:

Data & Analytics


0 download

TRANSCRIPT

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

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

2

the future of Picklete

4

Picklete

5

Picklete

Recommendation

Recommendation § Personalized recommendation

§ Collaborative filtering

7

PredcitonIO

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

10

PredcitonIO Open Source

§ open source framework§ for developers and data

scientists§ querying via restful API

Machine Learning

§ event collection§ algorithms deployment§ evaluation

11

Overview

12

DASE§ Data Sources§ Algorithm§ Serving§ Evaluation

13

DASE§ Data Sources§ Algorithm§ Serving§ Evaluation

14

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

15

how to start ?

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

17

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

how to use ?

Step 1

§ Run PredictionIO1 $ pio eventserver &

20

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

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

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

Step 5

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

… "datasource": {"params" : {

"appName": MyRecommendation}

},…

24

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

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

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

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