Apache PredictionIO

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(链接)
(链接)
(未显示1个用户的20个中间版本)
第2行: 第2行:
  
 
==指南==
 
==指南==
 +
 +
==安装==
 +
*快速安装
 +
$ bash -c "$(curl -s https://install.prediction.io/install.sh)"
 +
若用MySQL,需事先创建好表和用户
 +
CREATE DATABASE pio DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
 +
GRANT ALL PRIVILEGES ON pio.* TO pio@localhost IDENTIFIED BY 'pio';
 +
pio表
 +
MySQL [pio]> show tables;
 +
+------------------------------+
 +
| Tables_in_pio                |
 +
+------------------------------+
 +
| pio_meta_accesskeys          |
 +
| pio_meta_apps                |
 +
| pio_meta_channels            |
 +
| pio_meta_engineinstances    |
 +
| pio_meta_enginemanifests    |
 +
| pio_meta_evaluationinstances |
 +
| pio_model_models            |
 +
+------------------------------+
 +
启动pio
 +
pio eventserver &
 +
pio status
 +
*[https://github.com/mingfang/docker-predictionio docker-predictionio] [[Docker]]方式
 +
*[https://github.com/PredictionIO/PredictionIO-Vagrant PredictionIO-Vagrant] [[Vagrant]]虚拟机方式,[http://docs.huihoo.com/predictionio/docs.prediction.io/install/install-vagrant/ 安装步骤]。
 +
 +
==学习指南==
 +
pio template get PredictionIO/template-scala-parallel-textclassification tc
 +
cd tc
 +
pio app new tcApp
 +
pio import --appid 2 --input data/stopwords.json
 +
pio import --appid 2 --input data/emails.json
 +
pio build --verbose
 +
pio train
 +
pio deploy
 +
https://0.0.0.0:8000/
 +
curl -k -H "Content-Type: application/json" -d '{ "text":"I like speed and fast motorcycles." }' https://localhost:8000/queries.json
 +
{"category":"not spam","confidence":0.8526195109215867}
 +
curl -k -H "Content-Type: application/json" -d '{ "text":"Earn extra cash!" }' https://localhost:8000/queries.json
 +
{"category":"spam","confidence":0.5268770133242983}
 +
 +
注意 engine.json 的一些设置项:
 +
"engineFactory": "com.huihoo.TextClassificationEngine",
 +
"appName": "tcApp"
 +
使用另一个模版
 +
pio template get PredictionIO/template-scala-parallel-universal-recommendation startpio
 +
cd startpio
 +
pio app new pioApp
 +
pio app list
 +
pio import --appid 1 --input data/handmade-event-description.txt
 +
[http://docs.huihoo.com/predictionio/docs.prediction.io/demo/textclassification/index.html 更多细节>>>]
  
 
==模版==
 
==模版==
 
*[https://templates.prediction.io/ Engine Templates]
 
*[https://templates.prediction.io/ Engine Templates]
 +
*[https://github.com/PredictionIO/template-scala-parallel-recommendation 推荐模版]
 +
*[https://github.com/PredictionIO/template-scala-parallel-universal-recommendation 通用推荐模版]
 +
*[https://github.com/PredictionIO/template-scala-parallel-ecommercerecommendation 电商推荐模版]
 +
*[https://github.com/PredictionIO/template-scala-parallel-similarproduct 相似商品模版]
 +
*[https://github.com/PredictionIO/template-scala-parallel-productranking 商品排名模版]
 +
*[https://github.com/PredictionIO/template-scala-parallel-classification 分类模版]
 +
*[https://github.com/PredictionIO/template-scala-parallel-textclassification 文本分类模版]
 +
 +
==问题==
 +
https://0.0.0.0:8000 Cannot support TLS_RSA_WITH_AES_256_CBC_SHA with currently installed providers
 +
 +
安装 Java security jars
 +
* [http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html JDK 8]
 +
* [http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html JDK 7]
 +
 +
拷贝 US_export_policy.jar 和 local_policy.jar 到类似目录下:
 +
/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/security
 +
 +
[http://docs.huihoo.com/predictionio/docs.prediction.io/resources/faq/index.html 更多常见问题>>>]
  
 
==图集==
 
==图集==
第10行: 第80行:
 
image:predictionio-multiengines.png|多引擎
 
image:predictionio-multiengines.png|多引擎
 
image:predictionio-engine-data-pipeline.png|引擎
 
image:predictionio-engine-data-pipeline.png|引擎
image:predictionio-engine-instance.png|引擎实例
+
image:predictionio-engine-instance.png|引擎实例,DASE架构
 
image:predictionio-event-server.png|事件服务器
 
image:predictionio-event-server.png|事件服务器
 
image:predictionio-engine-evaluation.png|引擎评估
 
image:predictionio-engine-evaluation.png|引擎评估
 +
image:PredictionIO-Engine-Server.png|pio引擎
 
</gallery>
 
</gallery>
  
第21行: 第92行:
 
*[https://docs.prediction.io/datacollection/analytics-zeppelin/ Machine Learning Analytics with Zeppelin]
 
*[https://docs.prediction.io/datacollection/analytics-zeppelin/ Machine Learning Analytics with Zeppelin]
 
*[http://www.infoq.com/cn/news/2016/03/Salesforce-PredictionIO-CRM Salesforce收购机器学习创业新星PredictionIO]
 
*[http://www.infoq.com/cn/news/2016/03/Salesforce-PredictionIO-CRM Salesforce收购机器学习创业新星PredictionIO]
 +
*[https://www.lightbend.com/resources/case-studies-and-stories/why-predictionio-loved-using-play-to-build-its-popular-machine-learning-server Why PredictionIO Loved Using Play to Build its Popular Machine Learning Server]
  
 
[[category:recommender system]]
 
[[category:recommender system]]
第26行: 第98行:
 
[[category:spark]]
 
[[category:spark]]
 
[[category:HBase]]
 
[[category:HBase]]
 +
[[category:java]]
 +
[[category:scala]]
 +
[[category:play]]

2016年5月26日 (四) 06:47的版本

PredictionIO:是一个面向开发者和机器学习工程师的开源(Apache v2)机器学习服务器,基于 Apache Spark, Apache HBaseSpray 构建。

目录

指南

安装

  • 快速安装
$ bash -c "$(curl -s https://install.prediction.io/install.sh)"
若用MySQL,需事先创建好表和用户
CREATE DATABASE pio DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON pio.* TO pio@localhost IDENTIFIED BY 'pio';

pio表

MySQL [pio]> show tables;
+------------------------------+
| Tables_in_pio                |
+------------------------------+
| pio_meta_accesskeys          |
| pio_meta_apps                |
| pio_meta_channels            |
| pio_meta_engineinstances     |
| pio_meta_enginemanifests     |
| pio_meta_evaluationinstances |
| pio_model_models             |
+------------------------------+

启动pio

pio eventserver &
pio status

学习指南

pio template get PredictionIO/template-scala-parallel-textclassification tc
cd tc
pio app new tcApp
pio import --appid 2 --input data/stopwords.json
pio import --appid 2 --input data/emails.json
pio build --verbose
pio train
pio deploy
https://0.0.0.0:8000/
curl -k -H "Content-Type: application/json" -d '{ "text":"I like speed and fast motorcycles." }' https://localhost:8000/queries.json
{"category":"not spam","confidence":0.8526195109215867}
curl -k -H "Content-Type: application/json" -d '{ "text":"Earn extra cash!" }' https://localhost:8000/queries.json
{"category":"spam","confidence":0.5268770133242983}

注意 engine.json 的一些设置项:

"engineFactory": "com.huihoo.TextClassificationEngine",
"appName": "tcApp"

使用另一个模版

pio template get PredictionIO/template-scala-parallel-universal-recommendation startpio
cd startpio
pio app new pioApp
pio app list
pio import --appid 1 --input data/handmade-event-description.txt

更多细节>>>

模版

问题

https://0.0.0.0:8000 Cannot support TLS_RSA_WITH_AES_256_CBC_SHA with currently installed providers

安装 Java security jars

拷贝 US_export_policy.jar 和 local_policy.jar 到类似目录下:

/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/security

更多常见问题>>>

图集

链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱