Class RegressionRule
java.lang.Object
adaa.analytics.rules.logic.representation.rule.Rule
adaa.analytics.rules.logic.representation.rule.RegressionRule
- All Implemented Interfaces:
Serializable
,Cloneable
Class representing regression 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
ConstructorsConstructorDescriptionRegressionRule
(CompoundCondition premise, ElementaryCondition consequence) Creates a regression rule with a given premise and a consequence. -
Method Summary
Modifier and TypeMethodDescriptioncovers
(IExampleSet set) Applies the regression 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 specified example set.double
Gets value in the consequence.static boolean
void
setConsequenceValue
(double v) Gets value in the consequence.void
Sets p,n,P,N as well as consequence value and standard deviation on the basis of covering information.static void
setUseMean
(boolean v) toString()
Generates a text representation of the rule.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, covers, 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, setInducedContitionsCount, setPremise, setPValue, setRuleOrderNum, setWeight, setWeighted_n, setWeighted_N, setWeighted_p, setWeighted_P, toTable
-
Constructor Details
-
RegressionRule
Creates a regression rule with a given premise and a consequence.- Parameters:
premise
- Rule premise.consequence
- Rule consequence.
-
-
Method Details
-
setUseMean
public static void setUseMean(boolean v) -
getUseMean
public static boolean getUseMean() -
getConsequenceValue
public double getConsequenceValue()Gets value in the consequence. -
setConsequenceValue
public void setConsequenceValue(double v) Gets value in the consequence. -
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.
-
setCoveringInformation
Sets p,n,P,N as well as consequence value and standard deviation on the basis of covering information.- Overrides:
setCoveringInformation
in classRule
- Parameters:
cov
- Covering information.
-
covers
Applies the rule on a specified example set. -
covers
Applies the regression rule on a specified example set. -
covers
public void covers(IExampleSet set, ContingencyTable ct, Set<Integer> positives, Set<Integer> negatives) Description copied from class:Rule
Applies the rule on a specified example set. -
toString
Generates a text representation of the rule.
-