IOptimizedRule, RuleGenerationModepublic class OptRule extends Rule implements IOptimizedRule
Rule class.Rule class optimizationRuleandConjunction, APPROXIMATE, AT_LEAST, AT_MOST, briefDescriptionDelimiter, CERTAIN, conditionsAndDecisionsDelimiter, DEFAULT_RULE_IN_GENERATION_MODE, DOWNWARD, EQUAL, LEARNING_MEMORY_CONTAINER, orConjunction, POSSIBLE, ruleStarter, TEST_MEMORY_CONTAINER, UPWARD| Constructor | Description |
|---|---|
OptRule(int type,
int characteristicDecisionClassUsageTip,
Field characteristicDecisionClass,
ConditionValidator conditionValidator,
java.util.HashSet<Condition> conditions,
java.util.HashSet<Condition> decisions,
MemoryContainer learningMemoryContainer,
double consistencyLevel,
ApproximatedEntity approximatedEntity,
ApproximatedEntityDecisionsPredictor approximatedEntityDecisionsPredictor) |
|
OptRule(int type,
int characteristicDecisionClassUsageTip,
Field characteristicDecisionClass,
ConditionValidator conditionValidator,
java.util.HashSet<Condition> conditions,
java.util.HashSet<Condition> decisions,
MemoryContainer learningMemoryContainer,
int[] numbersOfPositiveExamples) |
Extends
Rule(int, int, Field, ConditionValidator, HashSet, HashSet, MemoryContainer, int[]) constructor. |
OptRule(int type,
int characteristicDecisionClassUsageTip,
Field characteristicDecisionClass,
ConditionValidator conditionValidator,
java.util.HashSet<Condition> conditions,
java.util.HashSet<Condition> decisions,
Attribute[] learningAttributes) |
Extends
Rule(int, int, Field, ConditionValidator, HashSet, HashSet, Attribute[]) constructor. |
OptRule(int type,
int characteristicDecisionClassUsageTip,
Field characteristicDecisionClass,
ConditionValidator conditionValidator,
java.util.HashSet<Condition> decisions,
MemoryContainer learningMemoryContainer,
int[] numbersOfPositiveExamples) |
Extends
Rule(int, int, Field, ConditionValidator, HashSet, MemoryContainer, int[]) constructor. |
OptRule(int type,
int characteristicDecisionClassUsageTip,
Field characteristicDecisionClass,
ConditionValidator conditionValidator,
MemoryContainer learningMemoryContainer,
int[] numbersOfPositiveExamples) |
Extends
Rule(int, int, Field, ConditionValidator, MemoryContainer, int[]) constructor. |
| Modifier and Type | Method | Description |
|---|---|---|
org.apache.xalan.xsltc.runtime.Hashtable |
getConditionsOpt() |
Gets hash table with all "regular" conditions present in this rule, indexed by attribute number.
|
RuleStatisticsOpt |
getRuleStatistics() |
Gets object which can store and calculate on demand (if not already stored) any statistic of this rule.
Gives direct access to that object, thus enabling not only to get any statistic, but also to set any. This method is especially important when after read from file this rule lacks reference to learning memory container. |
RuleStatisticsOpt |
getRuleStatisticsOpt() |
Gets object which can store and calculate on demand (if not already stored) any statistic of this rule.
Gives direct access to that object, thus enabling not only to get any statistic, but also to set any. This method is especially important when after read from file this rule lacks reference to learning memory container. |
java.util.HashSet<java.lang.Integer> |
getSetOfPositiveExamplesNumbers() |
Gets set with numbers of positive examples from learning memory container for which this rule was induced.
|
gnu.trove.TIntHashSet |
getSetOfPositiveExamplesNumbersOpt() |
Gets set with numbers of positive examples from learning memory container for which this rule was induced.
|
boolean |
setNumbersOfPositiveExamples(int[] numbersOfPositiveExamples) |
Sets numbers of positive examples for this rule.
Given list of numbers is transformed to TIntHashSet hash set and stored in this rule.Main goal of this method is to facilitate reconstruction of rule's set of positive examples' numbers after rule is read from file. Currently this method always returns true. |
boolean |
setOfPositiveExamplesNumbersContains(int exampleNumber) |
Checks if the set of positive examples numbers contains example with given number
|
boolean |
setOfPositiveExamplesNumbersIsSet() |
Checks if the set of positive examples numbers is set (!
|
int |
setOfPositiveExamplesNumbersSize() |
Gets size of the set of positive examples numbers
|
void |
setRuleStatistics(RuleStatistics ruleStatistics) |
Sets all statistics of this rule at once.
|
void |
setRuleStatisticsOpt(RuleStatisticsOpt ruleStatisticsOpt) |
Sets all statistics of this rule at once.
|
void |
setSetOfPositiveExamplesNumbers(java.util.HashSet<java.lang.Integer> setOfPositiveExamplesNumbers) |
Sets set with numbers of positive examples from learning memory container and thus affects all future checks
if this rule is supported by some example from learning memory container.
|
void |
setSetOfPositiveExamplesNumbersOpt(gnu.trove.TIntHashSet setOfPositiveExamplesNumbersOpt) |
Sets set with numbers of positive examples from learning memory container and thus affects all future checks
if this rule is supported by some example from learning memory container.
|
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddCondition, addDecision, addOrExchangeTemporaryCondition, containsCondition, containsConditionForAttribute, covers, covers, covers, coversNotNeutral, decisionsMatchedBy, decomposePairConditionsToSingleConditionsForPairOfValues, deleteCondition, deleteTemporaryCondition, enterRuleGenerationMode, getApproximatedEntitySize, getCharacteristicDecisionClass, getCharacteristicDecisionClassUsageTip, getCharacteristicDecisionClassUsageTipAsText, getConditions, getConditionsAsArray, getConditionValidator, getDecisions, getLearningAttributes, getLearningMemoryContainer, getQuantityOfConditions, getQuantityOfDecisions, getSetOfNeutralExamplesNumbers, getTemporarilyDeletedCondition, getTemporaryCondition, getTestMemoryContainer, getType, getTypeAsText, isInRuleGenerationMode, leaveRuleGenerationMode, memoryContainerIsCompatible, restoreTemporarilyDeletedCondition, setConditions, setDecisions, setLearningMemoryContainer, setNumbersOfNeutralExamples, setOfNeutralExamplesNumbersContains, setOfNeutralExamplesNumbersIsSet, setOfNeutralExamplesNumbersSize, setOrExchangeTemporarilyDeletedCondition, setSetOfNeutralExamplesNumbers, supportedBy, supportedByCoveredExample, toJAMMString, toShortString, toStringpublic OptRule(int type,
int characteristicDecisionClassUsageTip,
Field characteristicDecisionClass,
ConditionValidator conditionValidator,
java.util.HashSet<Condition> conditions,
java.util.HashSet<Condition> decisions,
MemoryContainer learningMemoryContainer,
int[] numbersOfPositiveExamples)
Rule(int, int, Field, ConditionValidator, HashSet, HashSet, MemoryContainer, int[]) constructor.type - see extended Rule class constructorcharacteristicDecisionClassUsageTip - see extended Rule class constructorcharacteristicDecisionClass - see extended Rule class constructorconditionValidator - see extended Rule class constructorconditions - see extended Rule class constructordecisions - see extended Rule class constructorlearningMemoryContainer - see extended Rule class constructornumbersOfPositiveExamples - see extended Rule class constructorInvalidValueException - see extended Rule class constructorjava.lang.NullPointerException - see extended Rule class constructorpublic OptRule(int type,
int characteristicDecisionClassUsageTip,
Field characteristicDecisionClass,
ConditionValidator conditionValidator,
java.util.HashSet<Condition> decisions,
MemoryContainer learningMemoryContainer,
int[] numbersOfPositiveExamples)
Rule(int, int, Field, ConditionValidator, HashSet, MemoryContainer, int[]) constructor.type - see extended Rule class constructorcharacteristicDecisionClassUsageTip - see extended Rule class constructorcharacteristicDecisionClass - see extended Rule class constructorconditionValidator - see extended Rule class constructordecisions - see extended Rule class constructorlearningMemoryContainer - see extended Rule class constructornumbersOfPositiveExamples - see extended Rule class constructorInvalidValueException - see extended Rule class constructorjava.lang.NullPointerException - see extended Rule class constructorpublic OptRule(int type,
int characteristicDecisionClassUsageTip,
Field characteristicDecisionClass,
ConditionValidator conditionValidator,
MemoryContainer learningMemoryContainer,
int[] numbersOfPositiveExamples)
Rule(int, int, Field, ConditionValidator, MemoryContainer, int[]) constructor.type - see extended Rule class constructorcharacteristicDecisionClassUsageTip - see extended Rule class constructorcharacteristicDecisionClass - see extended Rule class constructorconditionValidator - see extended Rule class constructorlearningMemoryContainer - see extended Rule class constructornumbersOfPositiveExamples - see extended Rule class constructorInvalidValueException - see extended Rule class constructorjava.lang.NullPointerException - see extended Rule class constructorpublic OptRule(int type,
int characteristicDecisionClassUsageTip,
Field characteristicDecisionClass,
ConditionValidator conditionValidator,
java.util.HashSet<Condition> conditions,
java.util.HashSet<Condition> decisions,
MemoryContainer learningMemoryContainer,
double consistencyLevel,
ApproximatedEntity approximatedEntity,
ApproximatedEntityDecisionsPredictor approximatedEntityDecisionsPredictor)
Rule(int, int, Field, ConditionValidator, HashSet, HashSet, MemoryContainer, double, ApproximatedEntity, ApproximatedEntityDecisionsPredictor) constructor.type - see extended Rule class constructorcharacteristicDecisionClassUsageTip - see extended Rule class constructorcharacteristicDecisionClass - see extended Rule class constructorconditionValidator - see extended Rule class constructorconditions - see extended Rule class constructordecisions - see extended Rule class constructorlearningMemoryContainer - see extended Rule class constructorconsistencyLevel - see extended Rule class constructorapproximatedEntity - see extended Rule class constructorapproximatedEntityDecisionsPredictor - see extended Rule class constructorInvalidValueException - see extended Rule class constructorjava.lang.NullPointerException - see extended Rule class constructorpublic OptRule(int type,
int characteristicDecisionClassUsageTip,
Field characteristicDecisionClass,
ConditionValidator conditionValidator,
java.util.HashSet<Condition> conditions,
java.util.HashSet<Condition> decisions,
Attribute[] learningAttributes)
Rule(int, int, Field, ConditionValidator, HashSet, HashSet, Attribute[]) constructor.type - see extended Rule class constructorcharacteristicDecisionClassUsageTip - see extended Rule class constructorcharacteristicDecisionClass - see extended Rule class constructorconditionValidator - see extended Rule class constructorconditions - see extended Rule class constructordecisions - see extended Rule class constructorlearningAttributes - see extended Rule class constructorInvalidValueException - see extended Rule class constructorjava.lang.NullPointerException - see extended Rule class constructorpublic org.apache.xalan.xsltc.runtime.Hashtable getConditionsOpt()
Condition or an array of type Condition[]
if there is more than one condition for considered attribute.
Returned hash table does not contain additional temporary condition (since it's not "regular" one),
but contains temporarily deleted condition (since it's not permanently deleted).getConditionsOpt in interface IOptimizedRulepublic RuleStatisticsOpt getRuleStatistics()
RuleStatisticsOpt is returned.getRuleStatistics in class RulegetRuleStatisticsOpt()public RuleStatisticsOpt getRuleStatisticsOpt()
getRuleStatisticsOpt in interface IOptimizedRulepublic void setRuleStatistics(RuleStatistics ruleStatistics)
RuleStatistics.set... methods) and finally set ready statistics in considered rule, by means of this method.setRuleStatistics in class RuleruleStatistics - all statistics of this ruleInvalidValueException - where given statistics are defined for different rule than thisInvalidTypeException - when rule's statistics are not of type RuleStatisticsOptsetRuleStatisticsOpt(RuleStatisticsOpt)public void setRuleStatisticsOpt(RuleStatisticsOpt ruleStatisticsOpt)
RuleStatistics.set... methods) and finally set ready statistics in considered rule, by means of this method.ruleStatisticsOpt - all statistics of this ruleInvalidValueException - where given statistics are defined for different rule than thispublic java.util.HashSet<java.lang.Integer> getSetOfPositiveExamplesNumbers()
null.getSetOfPositiveExamplesNumbersOpt instead.getSetOfPositiveExamplesNumbers in class RulegetSetOfPositiveExamplesNumbersOpt()public gnu.trove.TIntHashSet getSetOfPositiveExamplesNumbersOpt()
TIntHashSet is returned.getSetOfPositiveExamplesNumbersOpt in interface IOptimizedRulepublic void setSetOfPositiveExamplesNumbers(java.util.HashSet<java.lang.Integer> setOfPositiveExamplesNumbers)
setSetOfPositiveExamplesNumbersOpt instead.setSetOfPositiveExamplesNumbers in class RulesetOfPositiveExamplesNumbers - hash set with numbers of positive examples from learning memory containerjava.lang.NullPointerException - when given set of positive examples' numbers is nullsetSetOfPositiveExamplesNumbersOpt(TIntHashSet)public void setSetOfPositiveExamplesNumbersOpt(gnu.trove.TIntHashSet setOfPositiveExamplesNumbersOpt)
setOfPositiveExamplesNumbersOpt - hash set with numbers of positive examples from learning memory containerjava.lang.NullPointerException - when given set of positive examples' numbers is nullpublic boolean setNumbersOfPositiveExamples(int[] numbersOfPositiveExamples)
TIntHashSet hash set and stored in this rule.true.setNumbersOfPositiveExamples in class RulenumbersOfPositiveExamples - array with numbers of positive examples from learning memory container
for which this rule was createdtrue if numbers of positive examples have been successfully stored in this class,
false otherwisepublic boolean setOfPositiveExamplesNumbersContains(int exampleNumber)
setOfPositiveExamplesNumbersContains in class RuleexampleNumber - number of the example from rule's learning memory containertrue if rule's set of positive examples numbers contains given number,
false otherwisejava.lang.NullPointerException - when rule's set of positive examples numbers is nullpublic boolean setOfPositiveExamplesNumbersIsSet()
null)setOfPositiveExamplesNumbersIsSet in class Ruletrue if the set of positive examples numbers is set, false otherwisepublic int setOfPositiveExamplesNumbersSize()
setOfPositiveExamplesNumbersSize in class Rule