Class ContrastRule
java.lang.Object
adaa.analytics.rules.logic.representation.rule.Rule
adaa.analytics.rules.logic.representation.rule.ClassificationRule
adaa.analytics.rules.logic.representation.rule.ContrastRule
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
ContrastRegressionRule
,ContrastSurvivalRule
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Name of the attribute role used for grouping.protected double
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 contrast rule.ContrastRule
(CompoundCondition premise, ElementaryCondition consequence) Creates contrast rule with a given premise and a consequence. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Generates statistics in a text form.void
setRedundancy
(double v) toTable()
Converts a rule to semicolon-separated tabular form with selected statistics.Methods inherited from class adaa.analytics.rules.logic.representation.rule.ClassificationRule
covers, covers, covers, covers, getClassLabel, updateWeightAndPValue
Methods inherited from class adaa.analytics.rules.logic.representation.rule.Rule
clone, copyFrom, coversUnlabelled, equals, getConsequence, getCoveredNegatives, getCoveredPositives, getCoveringInformation, getInducedConditionsCount, getPremise, getPValue, getRuleOrderNum, getStat, getWeight, getWeighted_n, getWeighted_N, getWeighted_p, getWeighted_P, putStat, setConsequence, setCoveredNegatives, setCoveredPositives, setCoveringInformation, setInducedContitionsCount, setPremise, setPValue, setRuleOrderNum, setWeight, setWeighted_n, setWeighted_N, setWeighted_p, setWeighted_P, toString
-
Field Details
-
CONTRAST_ATTRIBUTE_ROLE
Name of the attribute role used for grouping.- See Also:
-
redundancy
protected double redundancy
-
-
Constructor Details
-
ContrastRule
public ContrastRule()Creates empty contrast rule. -
ContrastRule
Creates contrast rule with a given premise and a consequence.- Parameters:
premise
- Rule premise.consequence
- Rule consequence.
-
-
Method Details
-
setRedundancy
public void setRedundancy(double v) -
getRedundancy
public double getRedundancy() -
printStats
Description copied from class:Rule
Generates statistics in a text form.- Overrides:
printStats
in classRule
- Returns:
- Rule statistics.
-
getTableHeader
- Overrides:
getTableHeader
in classRule
-
toTable
Converts a rule to semicolon-separated tabular form with selected statistics.
-