Class ClassificationRuleSet
java.lang.Object
adaa.analytics.rules.logic.representation.ruleset.PredictionModel
adaa.analytics.rules.logic.representation.ruleset.RuleSetBase
adaa.analytics.rules.logic.representation.ruleset.ClassificationRuleSet
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ContrastRuleSet
Class representing a set of classification rules.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class adaa.analytics.rules.logic.representation.ruleset.RuleSetBase
RuleSetBase.Significance
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Name of the prediction attribute representing results of voting (counts).static final String
Name of the prediction attribute representing results of voting (weights).Fields inherited from class adaa.analytics.rules.logic.representation.ruleset.RuleSetBase
ANNOTATION_TEST_REPORT, attributes, growingTime, isVoting, knowledge, params, pruningTime, rules, totalTime
-
Constructor Summary
ConstructorsConstructorDescriptionClassificationRuleSet
(IExampleSet exampleSet, boolean isVoting, InductionParameters params, Knowledge knowledge) Invokes base class constructor. -
Method Summary
Modifier and TypeMethodDescriptionapply
(IExampleSet exampleSet) Applies the rule model on a given set (makes predictions for all examples).protected IAttribute
createPredictionAttributes
(IExampleSet exampleSet, IAttribute label) Computes prediction attributes (voting results) for a given set.double
Predicts class label for a given example.void
setDefaultClass
(String defaultClass) SetsdefaultClass
Methods inherited from class adaa.analytics.rules.logic.representation.ruleset.RuleSetBase
addRule, calculateAvgRuleCoverage, calculateAvgRulePrecision, calculateAvgRuleQuality, calculateConditionsCount, calculateInducedCondtionsCount, calculateSignificance, calculateSignificanceFDR, calculateSignificanceFWER, getGrowingTime, getIsVoting, getParams, getPruningTime, getRules, getTotalTime, performPrediction, setGrowingTime, setIsVoting, setPruningTime, setTotalTime, toString, toTable
Methods inherited from class adaa.analytics.rules.logic.representation.ruleset.PredictionModel
checkCompatibility, getLabel, getTrainingHeader, supportsConfidences
-
Field Details
-
ATTRIBUTE_VOTING_RESULTS_WEIGHTS
Name of the prediction attribute representing results of voting (weights).- See Also:
-
ATTRIBUTE_VOTING_RESULTS_COUNTS
Name of the prediction attribute representing results of voting (counts).- See Also:
-
-
Constructor Details
-
ClassificationRuleSet
public ClassificationRuleSet(IExampleSet exampleSet, boolean isVoting, InductionParameters params, Knowledge knowledge) Invokes base class constructor.- Parameters:
exampleSet
- Training set.isVoting
- Voting flag.params
- Induction parameters.knowledge
- User's knowledge.
-
-
Method Details
-
setDefaultClass
SetsdefaultClass
-
predict
Predicts class label for a given example. Sets output attributes describing voting results.- Specified by:
predict
in classRuleSetBase
- Parameters:
example
- Example to be examined.- Returns:
- Predicted class label.
- Throws:
OperatorException
-
apply
Applies the rule model on a given set (makes predictions for all examples).- Overrides:
apply
in classPredictionModel
- Parameters:
exampleSet
- Example set to be examined.- Returns:
- Example set with filled predictions and voting attributes.
- Throws:
OperatorException
-
createPredictionAttributes
Computes prediction attributes (voting results) for a given set.- Overrides:
createPredictionAttributes
in classPredictionModel
- Parameters:
exampleSet
- Example set to be examined.label
- Input label attribute.- Returns:
- Output label attribute.
-