PredictionIO DASE components and customization of Engine

The engine code base is based on the DASE model. DASE is abbreviated as follows:

D: Data Source and Data Preparator

A: Algorithm

S: Serving

E: Evaluation Metric

The following table describes the function of each of the components and the associated Java classes for the Product Recommendation Engine:

Component Functionality Java Class
Data Source and Data Preparator The data Source reads data from the input source and transforms into the format used by the Preparator. The Data Preparator preprocesses the data and forwards it to the algorithm for model training.

DataSource.java

DataSourceParams.java

Preparator.java

Algorithm The Algorithm component includes the Machine Learning algorithm and the settings of its parameters, and determines how a predictive model is constructed.

Algorithm.java

AlgorithmParams.java

Serving The Serving component takes prediction queries and returns prediction results. Serving can also support multiple algorithms by combining them. Business logic can be added in Serving to further customize the final returned results.

Serving.java

 

Evaluation Metric An Evaluation Metric measures prediction accuracy by allocating a numerical score. It can be used to compare algorithms or algorithm parameter settings.

EvaluationParameter.java

EvaluationSpec.java

PrecisionMetric.java

The following diagram shows how the components documented in the table work together:

Let's dive deep into the code and check how one can customize the engine logic.

The PredictionIO engine is built in Scala and all the APIs are documented at https://predictionio.incubator.apache.org/api/current/#org.apache.predictionio.controller.package.

We have purposefully chosen both Java-based and Scala-based template engine code so that readers familiar with the simple object oriented language like Java or familiar with Scala can understand easily.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset