基于 PredictionIO 搭建全栈式机器学习平台

2018-10-12  本文已影响0人  Vincent_fb7c

一. 前言

1. PredictionIO是什么?

我们负责打理基础结构,新数据进来的时候我们会对模型进行重新训练。我们还负责处理算法。它并不是黑箱算法。 ---PredictionIO CEO

2. PredictionIO有哪些特性

3. PredictionIO优点

  1. 可以减小研发工期
  2. 可监控
  3. 可以将模型部署成在线服务可以被实时调用预测

4. PredictionIO缺点

1.服务端暂时只有java/scala

  1. prediction 依赖spark 太重
  2. predictionio 对多个模型同时部署还不够友好
  3. prediction的model存储 版本控制比较简陋

5. PredictionIO架构介绍

PredictionIO数据流

PredictionIO 由三大组件构成:

Event Server

Event Server collects data from your application, in real-time or in batch. It can also unify data that are related to your application from multiple platforms. After data is collected, it mainly serves two purposes:

  1. Provide data to Engine(s) for model training and evaluation
  2. Offer a unified view for data analysis


    image.png

Engine

Predictionio 大致分为五大组件

image.png
  1. PredictionIO使用Event Server来导入数据并存储到HBase中;
  2. 随后这些数据进入一个基于Spark的PredictionIO Engine,PredictionIO Engine可能包括一个用于导入数据的Data Source,一个用于数据处理ETL等的Data Preparator;同时,一个推荐系统可能包括多个算法,因此数据需要放到不同的Algorithm中做training;
  3. 在做完training之后生成模型,这里用户可以根据需求来编写持久化方法,确定数据储存的位置,是本地文件系统亦或是HDFS;
  4. 有了这些model之后,下一步需要做的是serving以响应用户的请求,接受用户的一些查询从而生成结果。
模型训练
EVENT响应query

二. PredictionIO 安装

推荐 docker 安装

安装中的坑

三. PredictionIO sample

http://predictionio.apache.org/templates/recommendation/quickstart/

四. PredictionIO命令集

Reference

  1. Official site
  2. Blog
上一篇 下一篇

猜你喜欢

热点阅读