introduce to predictionio
TRANSCRIPT
![Page 1: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/1.jpg)
Prediction IO2016/06/01 (Wed.) @ Exma-Square MeetingWeiYuan(@v123582)
![Page 2: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/2.jpg)
Outline § the future of Picklete§ Recommendation§ PredcitonIO§ how to start ?§ how to use ?
2
![Page 3: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/3.jpg)
the future of Picklete
![Page 4: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/4.jpg)
4
Picklete
![Page 5: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/5.jpg)
5
Picklete
![Page 6: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/6.jpg)
Recommendation
![Page 7: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/7.jpg)
Recommendation § Personalized recommendation
§ Collaborative filtering
7
![Page 8: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/8.jpg)
![Page 9: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/9.jpg)
PredcitonIO
![Page 10: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/10.jpg)
ML as a ServicesIntegrate everything of ML together nicely and move from prototyping to production
10
![Page 11: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/11.jpg)
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](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/12.jpg)
Overview
12
![Page 13: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/13.jpg)
DASE§ Data Sources§ Algorithm§ Serving§ Evaluation
13
![Page 14: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/14.jpg)
DASE§ Data Sources§ Algorithm§ Serving§ Evaluation
14
![Page 15: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/15.jpg)
Arch.§ Spark§ Mlib§ HBase§ HDFS§ Hadoop
15
![Page 16: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/16.jpg)
how to start ?
![Page 17: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/17.jpg)
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](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/18.jpg)
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](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/19.jpg)
how to use ?
![Page 20: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/20.jpg)
Step 1
§ Run PredictionIO1 $ pio eventserver &
20
![Page 21: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/21.jpg)
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](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/22.jpg)
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](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/23.jpg)
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](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/24.jpg)
Step 5
§ Deploy the Engine as a Service./Engine.json1234567
… "datasource": {"params" : {
"appName": MyRecommendation}
},…
24
![Page 25: Introduce to PredictionIO](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/25.jpg)
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](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/26.jpg)
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](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/27.jpg)
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](https://reader031.vdocuments.mx/reader031/viewer/2022030310/58f9a92d760da3da068b6bd8/html5/thumbnails/28.jpg)
Thanks for listening.2016/06/01 (Wed.) @ Exma-SquareWeiYuan(@v123582)v123582.github.io