This is a default implementation to perform batch prediction.
This is a default implementation to perform batch prediction. Override this method for a custom implementation.
A model
An RDD of index-query tuples. The index is used to keep track of predicted results with corresponding queries.
Batch of predicted results
:: DeveloperApi :: Engine developers should not use this directly.
:: DeveloperApi :: Engine developers should not use this directly. This is called by evaluation workflow to perform batch prediction.
Spark context
Model
Batch of queries
Batch of predicted results
:: DeveloperApi :: Serializer for Java query classes using Gson
:: DeveloperApi :: Serializer for Java query classes using Gson
:: DeveloperApi :: Engine developers should not use this directly (read on to see how parallel-to-local algorithm models are persisted).
:: DeveloperApi :: Engine developers should not use this directly (read on to see how parallel-to-local algorithm models are persisted).
Parallel-to-local algorithms produce local models. By default, models will be serialized and stored automatically. Engine developers can override this behavior by mixing the PersistentModel trait into the model class, and PredictionIO will call PersistentModel.save instead. If it returns true, a org.apache.predictionio.workflow.PersistentModelManifest will be returned so that during deployment, PredictionIO will use PersistentModelLoader to retrieve the model. Otherwise, Unit will be returned and the model will be re-trained on-the-fly.
Spark context
Model ID
Algorithm parameters that trained this model
Model
The model itself for automatic persistence, an instance of org.apache.predictionio.workflow.PersistentModelManifest for manual persistence, or Unit for re-training on deployment
Implement this method to produce a prediction from a query and trained model.
Implement this method to produce a prediction from a query and trained model.
Trained model produced by train.
An input query.
A prediction.
:: DeveloperApi :: Engine developers should not use this directly.
:: DeveloperApi :: Engine developers should not use this directly. Called by serving to perform a single prediction.
Model
Query
Predicted result
:: DeveloperApi :: Obtains the type signature of query for this algorithm
:: DeveloperApi :: Obtains the type signature of query for this algorithm
Type signature of query
:: DeveloperApi :: Serializer for Scala query classes using org.apache.predictionio.controller.Utils.json4sDefaultFormats
:: DeveloperApi :: Serializer for Scala query classes using org.apache.predictionio.controller.Utils.json4sDefaultFormats
Implement this method to produce a model from prepared data.
Implement this method to produce a model from prepared data.
Trained model.
:: DeveloperApi :: Engine developers should not use this directly.
:: DeveloperApi :: Engine developers should not use this directly. This is called by workflow to train a model.
Spark context
Prepared data
Trained model