Class ClassificationRule
java.lang.Object
adaa.analytics.rules.logic.representation.rule.Rule
adaa.analytics.rules.logic.representation.rule.ClassificationRule
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
ContrastRule
Class representing a classification rule.
- See Also:
-
Field Summary
Fields inherited from class adaa.analytics.rules.logic.representation.rule.Rule
consequence, coveredNegatives, coveredPositives, inducedConditionsCount, premise, pvalue, ruleOrderNum, stats, weight, weighted_n, weighted_N, weighted_p, weighted_P
-
Constructor Summary
ConstructorsConstructorDescriptionCreates empty classification rule.ClassificationRule
(CompoundCondition premise, ElementaryCondition consequence) Creates classification rule with a given premise and a consequence. -
Method Summary
Modifier and TypeMethodDescriptioncovers
(IExampleSet set) Applies the rule on a specified example set.void
covers
(IExampleSet set, ContingencyTable ct) Applies the rule on a specified example set.void
covers
(IExampleSet set, ContingencyTable ct, Set<Integer> positives, Set<Integer> negatives) Applies the rule on a specified example set.covers
(IExampleSet set, Set<Integer> filterIds) Applies the rule on a part of a specified example set.void
updateWeightAndPValue
(IExampleSet trainSet, ContingencyTable ct, IQualityMeasure votingMeasure) CalculatesRule.weight
andRule.pvalue
.Methods inherited from class adaa.analytics.rules.logic.representation.rule.Rule
clone, copyFrom, coversUnlabelled, equals, getConsequence, getCoveredNegatives, getCoveredPositives, getCoveringInformation, getInducedConditionsCount, getPremise, getPValue, getRuleOrderNum, getStat, getTableHeader, getWeight, getWeighted_n, getWeighted_N, getWeighted_p, getWeighted_P, printStats, putStat, setConsequence, setCoveredNegatives, setCoveredPositives, setCoveringInformation, setInducedContitionsCount, setPremise, setPValue, setRuleOrderNum, setWeight, setWeighted_n, setWeighted_N, setWeighted_p, setWeighted_P, toString, toTable
-
Constructor Details
-
ClassificationRule
public ClassificationRule()Creates empty classification rule. -
ClassificationRule
Creates classification rule with a given premise and a consequence.- Parameters:
premise
- Rule premise.consequence
- Rule consequence.
-
-
Method Details
-
getClassLabel
-
updateWeightAndPValue
public void updateWeightAndPValue(IExampleSet trainSet, ContingencyTable ct, IQualityMeasure votingMeasure) CalculatesRule.weight
andRule.pvalue
.- Specified by:
updateWeightAndPValue
in classRule
- Parameters:
trainSet
- Training set.ct
- Contingency table.votingMeasure
- Measure used as weight.
-
covers
Applies the rule on a part of a specified example set. -
covers
Applies the rule on a specified example set. -
covers
Applies the rule on a specified example set. -
covers
public void covers(IExampleSet set, ContingencyTable ct, Set<Integer> positives, Set<Integer> negatives) Applies the rule on a specified example set.
-