Class ContrastRuleSet
java.lang.Object
adaa.analytics.rules.logic.representation.ruleset.PredictionModel
adaa.analytics.rules.logic.representation.ruleset.RuleSetBase
adaa.analytics.rules.logic.representation.ruleset.ClassificationRuleSet
adaa.analytics.rules.logic.representation.ruleset.ContrastRuleSet
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ContrastRegressionRuleSet
,ContrastSurvivalRuleSet
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class adaa.analytics.rules.logic.representation.ruleset.RuleSetBase
RuleSetBase.Significance
-
Field Summary
FieldsFields inherited from class adaa.analytics.rules.logic.representation.ruleset.ClassificationRuleSet
ATTRIBUTE_VOTING_RESULTS_COUNTS, ATTRIBUTE_VOTING_RESULTS_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
ConstructorsConstructorDescriptionContrastRuleSet
(IExampleSet exampleSet, boolean isVoting, InductionParameters params, Knowledge knowledge) Invokes base class constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(String positiveClass, String negativeClass, ContrastRule rule) apply
(IExampleSet exampleSet) Applies the rule model on a given set (makes predictions for all examples).double[]
Calculates contrast sets indicators averaged within contrasts and then between contrasts.int
double
Predicts class label for a given example.toString()
Generates text representation of the rule set which contains:Methods inherited from class adaa.analytics.rules.logic.representation.ruleset.ClassificationRuleSet
createPredictionAttributes, setDefaultClass
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, toTable
Methods inherited from class adaa.analytics.rules.logic.representation.ruleset.PredictionModel
checkCompatibility, getLabel, getTrainingHeader, supportsConfidences
-
Field Details
-
OTHER_CLASSES
- See Also:
-
-
Constructor Details
-
ContrastRuleSet
public ContrastRuleSet(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
-
getAllSets
-
getTotalDuplicates
public int getTotalDuplicates() -
calculateAvgContrastIndicators
Calculates contrast sets indicators averaged within contrasts and then between contrasts.- Returns:
- Contrast set indicators.
-
calculateAttributeStats
public double[] calculateAttributeStats() -
add
-
predict
Predicts class label for a given example. Sets output attributes describing voting results.- Overrides:
predict
in classClassificationRuleSet
- Parameters:
example
- Example to be examined.- Returns:
- Predicted class label.
- Throws:
OperatorException
-
apply
Description copied from class:ClassificationRuleSet
Applies the rule model on a given set (makes predictions for all examples).- Overrides:
apply
in classClassificationRuleSet
- Parameters:
exampleSet
- Example set to be examined.- Returns:
- Example set with filled predictions and voting attributes.
- Throws:
OperatorException
-
toString
Generates text representation of the rule set which contains:- induction parameters,
- user's knowledge (if defined),
- list of rules,
- information about coverage of the training set examples.
- Overrides:
toString
in classRuleSetBase
- Returns:
- Rule set in the text form.
-