Class PredictionModel
java.lang.Object
adaa.analytics.rules.logic.representation.ruleset.PredictionModel
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RuleSetBase
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply
(IExampleSet exampleSet) Applies the model by creating a predicted label attribute and setting the predicted label values.protected void
checkCompatibility
(IExampleSet exampleSet) This method is invoked before the model is actually applied.protected IAttribute
createPredictionAttributes
(IExampleSet exampleSet, IAttribute label) This method creates prediction attributes like the predicted label and confidences if needed.getLabel()
Returns the label attribute.abstract IExampleSet
performPrediction
(IExampleSet exampleSet, IAttribute predictedLabel) Subclasses should iterate through the given example set and set the prediction for each example.protected boolean
supportsConfidences
(IAttribute label) This method determines if confidence attributes are created depending on the current label.
-
Constructor Details
-
PredictionModel
-
-
Method Details
-
getTrainingHeader
-
performPrediction
public abstract IExampleSet performPrediction(IExampleSet exampleSet, IAttribute predictedLabel) throws OperatorException Subclasses should iterate through the given example set and set the prediction for each example. The given predicted label attribute was already be added to the example set and should be used to set the predicted values.- Throws:
OperatorException
-
apply
Applies the model by creating a predicted label attribute and setting the predicted label values.- Throws:
OperatorException
-
getLabel
Returns the label attribute. -
checkCompatibility
This method is invoked before the model is actually applied. The default implementation performs some basic compatibility checks and writes warnings if the given example set (for applying the model) does not fit the training example set. Subclasses might override this method and might throw exceptions which will prevent the application of the model.- Throws:
OperatorException
-
createPredictionAttributes
This method creates prediction attributes like the predicted label and confidences if needed. -
supportsConfidences
This method determines if confidence attributes are created depending on the current label. Usually this depends only on the fact that the label is nominal, but subclasses might override this to avoid attribute construction for confidences.
-