Package org.jbpm.prediction.pmml
Class AbstractPMMLBackend
- java.lang.Object
-
- org.jbpm.prediction.pmml.AbstractPMMLBackend
-
- All Implemented Interfaces:
org.kie.internal.task.api.prediction.PredictionService
- Direct Known Subclasses:
PMMLRandomForest
public abstract class AbstractPMMLBackend extends Object implements org.kie.internal.task.api.prediction.PredictionService
-
-
Field Summary
Fields Modifier and Type Field Description protected doubleconfidenceThresholdprotected List<String>inputFeaturesprotected StringoutcomeFeatureNameprotected List<? extends org.jpmml.evaluator.OutputField>outputFields
-
Constructor Summary
Constructors Constructor Description AbstractPMMLBackend(List<String> inputFeatures, String outputFeatureName, double confidenceThreshold, File pmmlFile)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Map<String,?>evaluate(Map<String,Object> data)protected abstract Map<String,Object>preProcess(Map<String,Object> data)Returns the processed data (e.g. perform categorisation, etc).voidtrain(org.kie.api.task.model.Task task, Map<String,Object> inputData, Map<String,Object> outputData)Method to train a model.
-
-
-
Method Detail
-
train
public void train(org.kie.api.task.model.Task task, Map<String,Object> inputData, Map<String,Object> outputData)Method to train a model. In the PMML case, this is a no-op.- Specified by:
trainin interfaceorg.kie.internal.task.api.prediction.PredictionService- Parameters:
task- Human task datainputData- A map containing the input attribute names as keys and the attribute values as values.outputData- A map containing the output attribute names as keys and the attribute values as values.
-
preProcess
protected abstract Map<String,Object> preProcess(Map<String,Object> data)
Returns the processed data (e.g. perform categorisation, etc). If no processing is needed, simply return the original data.- Parameters:
data- A map containing the input data, with attribute names as key and values as values.- Returns:
- data A map containing the processed data, with attribute names as key and values as values.
-
-