Package org.kie.pmml.commons.model
Class KiePMMLModel
- java.lang.Object
-
- org.kie.pmml.commons.model.abstracts.AbstractKiePMMLComponent
-
- org.kie.pmml.commons.model.KiePMMLModel
-
- All Implemented Interfaces:
Serializable,org.kie.pmml.api.models.PMMLModel
- Direct Known Subclasses:
KiePMMLFactoryModel
public abstract class KiePMMLModel extends AbstractKiePMMLComponent implements org.kie.pmml.api.models.PMMLModel
KIE representation of PMML model- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKiePMMLModel.Builder<T extends KiePMMLModel>
-
Field Summary
Fields Modifier and Type Field Description protected Objectaffinityprotected ObjectentityIdprotected List<KiePMMLOutputField>kiePMMLOutputFieldsprotected List<KiePMMLTarget>kiePMMLTargetsprotected KiePMMLLocalTransformationslocalTransformationsprotected List<org.kie.pmml.api.models.MiningField>miningFieldsprotected org.kie.pmml.api.enums.MINING_FUNCTIONminingFunctionprotected List<org.kie.pmml.api.models.OutputField>outputFieldsprotected Map<String,Object>outputFieldsMapprotected org.kie.pmml.api.enums.PMML_MODELpmmlMODELprotected ObjectpredictedDisplayValueprotected StringtargetFieldprotected KiePMMLTransformationDictionarytransformationDictionary-
Fields inherited from class org.kie.pmml.commons.model.abstracts.AbstractKiePMMLComponent
extensions, id, name, parentId
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedKiePMMLModel(String name, List<KiePMMLExtension> extensions)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Objectevaluate(Object knowledgeBase, Map<String,Object> requestData)ObjectgetAffinity()ObjectgetEntityId()List<KiePMMLOutputField>getKiePMMLOutputFields()List<KiePMMLTarget>getKiePMMLTargets()StringgetKModulePackageName()Method to retrieve the package name to be used inside kiebase/package attribute of kmodule.xml and to use for package creation inside PMMLAssemblerService By default returns the package name of the current instance To be eventually overridden.KiePMMLLocalTransformationsgetLocalTransformations()List<org.kie.pmml.api.models.MiningField>getMiningFields()org.kie.pmml.api.enums.MINING_FUNCTIONgetMiningFunction()List<org.kie.pmml.api.models.OutputField>getOutputFields()Map<String,Object>getOutputFieldsMap()org.kie.pmml.api.enums.PMML_MODELgetPmmlMODEL()ObjectgetPredictedDisplayValue()Map<String,Double>getProbabilityMap()protected abstract LinkedHashMap<String,Double>getProbabilityResultMap()Returns the probability map evaluated by the modelStringgetTargetField()KiePMMLTransformationDictionarygetTransformationDictionary()protected voidsetAffinity(Object affinity)protected voidsetEntityId(Object entityId)voidsetKiePMMLTargets(List<KiePMMLTarget> kiePMMLTargets)voidsetMiningFields(List<org.kie.pmml.api.models.MiningField> miningFields)voidsetOutputFields(List<org.kie.pmml.api.models.OutputField> outputFields)protected voidsetPredictedDisplayValue(Object predictedDisplayValue)-
Methods inherited from class org.kie.pmml.commons.model.abstracts.AbstractKiePMMLComponent
getExtensions, getId, getName, getParentId, setParentId
-
-
-
-
Field Detail
-
pmmlMODEL
protected org.kie.pmml.api.enums.PMML_MODEL pmmlMODEL
-
miningFunction
protected org.kie.pmml.api.enums.MINING_FUNCTION miningFunction
-
targetField
protected String targetField
-
miningFields
protected List<org.kie.pmml.api.models.MiningField> miningFields
-
outputFields
protected List<org.kie.pmml.api.models.OutputField> outputFields
-
kiePMMLOutputFields
protected List<KiePMMLOutputField> kiePMMLOutputFields
-
kiePMMLTargets
protected List<KiePMMLTarget> kiePMMLTargets
-
transformationDictionary
protected KiePMMLTransformationDictionary transformationDictionary
-
localTransformations
protected KiePMMLLocalTransformations localTransformations
-
predictedDisplayValue
protected Object predictedDisplayValue
-
entityId
protected Object entityId
-
affinity
protected Object affinity
-
-
Constructor Detail
-
KiePMMLModel
protected KiePMMLModel(String name, List<KiePMMLExtension> extensions)
-
-
Method Detail
-
getPmmlMODEL
public org.kie.pmml.api.enums.PMML_MODEL getPmmlMODEL()
-
getMiningFunction
public org.kie.pmml.api.enums.MINING_FUNCTION getMiningFunction()
-
getTargetField
public String getTargetField()
-
getKModulePackageName
public String getKModulePackageName()
Method to retrieve the package name to be used inside kiebase/package attribute of kmodule.xml and to use for package creation inside PMMLAssemblerService By default returns the package name of the current instance To be eventually overridden.- Returns:
-
getMiningFields
public List<org.kie.pmml.api.models.MiningField> getMiningFields()
- Specified by:
getMiningFieldsin interfaceorg.kie.pmml.api.models.PMMLModel
-
setMiningFields
public void setMiningFields(List<org.kie.pmml.api.models.MiningField> miningFields)
-
getOutputFields
public List<org.kie.pmml.api.models.OutputField> getOutputFields()
- Specified by:
getOutputFieldsin interfaceorg.kie.pmml.api.models.PMMLModel
-
setOutputFields
public void setOutputFields(List<org.kie.pmml.api.models.OutputField> outputFields)
-
getKiePMMLTargets
public List<KiePMMLTarget> getKiePMMLTargets()
-
setKiePMMLTargets
public void setKiePMMLTargets(List<KiePMMLTarget> kiePMMLTargets)
-
getKiePMMLOutputFields
public List<KiePMMLOutputField> getKiePMMLOutputFields()
-
getTransformationDictionary
public KiePMMLTransformationDictionary getTransformationDictionary()
-
getLocalTransformations
public KiePMMLLocalTransformations getLocalTransformations()
-
getPredictedDisplayValue
public Object getPredictedDisplayValue()
-
setPredictedDisplayValue
protected void setPredictedDisplayValue(Object predictedDisplayValue)
-
getEntityId
public Object getEntityId()
-
setEntityId
protected void setEntityId(Object entityId)
-
getAffinity
public Object getAffinity()
-
setAffinity
protected void setAffinity(Object affinity)
-
evaluate
public abstract Object evaluate(Object knowledgeBase, Map<String,Object> requestData)
- Parameters:
knowledgeBase- the knowledgeBase we are working on. Add asObjectto avoid direct dependency. It is needed only by Drools-dependent models, so it may be ignored by othersrequestData-- Returns:
-
getProbabilityResultMap
protected abstract LinkedHashMap<String,Double> getProbabilityResultMap()
Returns the probability map evaluated by the model- Returns:
-
-