欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Apache PredictionIO
来自开放百科 - 灰狐
(版本间的差异)
小 (→安装) |
小 (→简介) |
||
(未显示1个用户的22个中间版本) | |||
第1行: | 第1行: | ||
PredictionIO:是一个面向开发者和机器学习工程师的开源(Apache v2)[[machine learning|机器学习]]服务器,基于 [[Apache Spark]], [[Apache HBase]] 和 [[Spray]] 构建。 | PredictionIO:是一个面向开发者和机器学习工程师的开源(Apache v2)[[machine learning|机器学习]]服务器,基于 [[Apache Spark]], [[Apache HBase]] 和 [[Spray]] 构建。 | ||
+ | [[文件:predictionio.png|right]] | ||
− | == | + | ==简介== |
+ | PredictionIO 主要由三部分组成:数据收集和存储、模型训练以及模型部署和服务暴露。 | ||
+ | |||
+ | 开发者只需要基于它提供的相应接口实现数据处理逻辑、模型算法和预测逻辑,无需在诸如存储数据以及训练模型之类的事情上投入额外精力。在不要求高并发处理的情况下,PredictionIO 能支持不同大小的数据集。可使用 PredictionIO 来为中小企业构建预测类智能服务,或者在构建复杂定制化预测引擎的过程中进行概念验证。 | ||
+ | |||
+ | Apache PredictionIO主要依赖以下项目: | ||
+ | *[[Apache HBase]] | ||
+ | *[[Apache Spark]] | ||
+ | *[[HDFS]] | ||
+ | *[[Elasticsearch]] | ||
+ | |||
+ | ==功能== | ||
==安装== | ==安装== | ||
− | |||
*快速安装 | *快速安装 | ||
$ bash -c "$(curl -s https://install.prediction.io/install.sh)" | $ 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/ 安装步骤]。 | *[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 更多细节>>>] | ||
==模版== | ==模版== | ||
第18行: | 第75行: | ||
*[https://github.com/PredictionIO/template-scala-parallel-classification 分类模版] | *[https://github.com/PredictionIO/template-scala-parallel-classification 分类模版] | ||
*[https://github.com/PredictionIO/template-scala-parallel-textclassification 文本分类模版] | *[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 更多常见问题>>>] | ||
==图集== | ==图集== | ||
<gallery> | <gallery> | ||
+ | image:apache-predictionio-architecture.png|架构 | ||
image:predictionio-multiengines.png|多引擎 | image:predictionio-multiengines.png|多引擎 | ||
image:predictionio-engine-data-pipeline.png|引擎 | image:predictionio-engine-data-pipeline.png|引擎 | ||
第26行: | 第98行: | ||
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> | ||
第34行: | 第107行: | ||
*[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]] | ||
第39行: | 第113行: | ||
[[category:spark]] | [[category:spark]] | ||
[[category:HBase]] | [[category:HBase]] | ||
+ | [[category:java]] | ||
+ | [[category:scala]] | ||
+ | [[category:play]] | ||
+ | [[category:apache]] | ||
+ | [[category:huihoo]] |
2018年11月15日 (四) 08:15的最后版本
PredictionIO:是一个面向开发者和机器学习工程师的开源(Apache v2)机器学习服务器,基于 Apache Spark, Apache HBase 和 Spray 构建。
目录 |
[编辑] 简介
PredictionIO 主要由三部分组成:数据收集和存储、模型训练以及模型部署和服务暴露。
开发者只需要基于它提供的相应接口实现数据处理逻辑、模型算法和预测逻辑,无需在诸如存储数据以及训练模型之类的事情上投入额外精力。在不要求高并发处理的情况下,PredictionIO 能支持不同大小的数据集。可使用 PredictionIO 来为中小企业构建预测类智能服务,或者在构建复杂定制化预测引擎的过程中进行概念验证。
Apache PredictionIO主要依赖以下项目:
[编辑] 功能
[编辑] 安装
- 快速安装
$ 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
[编辑] 图集
[编辑] 链接
分享您的观点