public class PreferenceGraphGeneratorVirtualAllRules extends PreferenceGraphGenerator
Modifier and Type | Field | Description |
---|---|---|
static int |
COVER_ANY_NEGATIVE_EXAMPLES |
Possible treatment of negative examples, defined for
existsCoveringRule(Union, Example) method. |
static int |
COVER_NONE_OF_NEGATIVE_EXAMPLES |
Possible treatment of negative examples, defined for
existsCoveringRule(Union, Example) method. |
static int |
COVER_ONLY_INCONSISTENT_AND_BOUNDARY_NEGATIVE_EXAMPLES |
Possible treatment of negative examples, defined for
existsCoveringRule(Union, Example) method. |
static int |
COVER_ONLY_INCONSISTENT_NEGATIVE_EXAMPLES |
Possible treatment of negative examples, defined for
existsCoveringRule(Union, Example) method. |
AT_LEAST_AND_AT_MOST_RELATIONS, AT_LEAST_RELATIONS, AT_MOST_RELATIONS, DEFAULT_FUZZY_SATISFACTION_DEGREE_CALCULATION_METHOD, MAX_CREDIBILITY, MAX_PRODUCT_OF_CREDIBILITY_AND_COVERAGE_FACTOR, superviseConstructionOfPreferenceGraph, throwExceptionWhenAllPossibleDecisionAttributeValuesAreNotStoredInRulesContainer
Constructor | Description |
---|---|
PreferenceGraphGeneratorVirtualAllRules(MemoryContainer informationTable,
EvaluationDifference2PreferenceIntensityDegree evaluationDifference2PreferenceIntensityDegree,
UnionContainer unionContainer,
int consideredRelations,
boolean calculateFuzzySatisfactionDegrees,
int objectConsistencyMeasure,
java.util.HashMap<Field,java.lang.Double> objectConsistencyMeasureUpwardThresholds,
java.util.HashMap<Field,java.lang.Double> objectConsistencyMeasureDownwardThresholds,
int negativeExamplesTreatment) |
Constructor for
PreferenceGraphGeneratorVirtualAllRules class,
which sets this generator to work in VC-DRSA mode with certain rules only,
using one of monotonic object consistency measures $\epsilon$, $\epsilon*$ or $\epsilon'$. |
PreferenceGraphGeneratorVirtualAllRules(MemoryContainer informationTable,
EvaluationDifference2PreferenceIntensityDegree evaluationDifference2PreferenceIntensityDegree,
UnionContainer unionContainer,
int typeOfRules,
int consideredRelations,
boolean calculateFuzzySatisfactionDegrees,
int ruleConsistencyMeasure) |
Constructor for
PreferenceGraphGeneratorVirtualAllRules class,
which sets this generator to work in DRSA mode. |
Modifier and Type | Method | Description |
---|---|---|
PreferenceGraph |
generatePreferenceGraph() |
Gets preference graph resulting from application of robust ALL RULES
to all pairs of objects from the test information table.
Takes into account Settings.getTypeOfFamilyOfCriteria() value. |
int |
getNegativeExamplesTreatment() |
|
int |
getObjectConsistencyMeasure() |
|
java.util.HashMap<Field,java.lang.Double> |
getObjectConsistencyMeasureDownwardThresholds() |
|
java.util.HashMap<Field,java.lang.Double> |
getObjectConsistencyMeasureUpwardThresholds() |
|
UnionContainer |
getUnionContainer() |
Gets union container created for learning PCT
|
boolean |
isInDRSAMode() |
Tells if this generator works in DRSA mode
|
boolean |
isInVCDRSAMode() |
Tells if this generator works in VC-DRSA mode
|
void |
setFuzzySatisfactionDegreeCalculationMethod(int fuzzySatisfactionDegreeCalculationMethod) |
Sets the method of calculating fuzzy satisfaction degrees of any at least / at most relation in generated preference graph.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConsideredRelations, getFullPct, getFuzzySatisfactionDegreeCalculationMethod, getInformationTable, getRuleConsistencyMeasure, getRulesContainer, getTypeOfRules, isCalculateFuzzySatisfactionDegrees
public static final int COVER_NONE_OF_NEGATIVE_EXAMPLES
existsCoveringRule(Union, Example)
method.
This value is used in DRSA mode only.
It means that considered rules have to cover only examples belonging to lower/upper approximation of a given union.public static final int COVER_ONLY_INCONSISTENT_NEGATIVE_EXAMPLES
existsCoveringRule(Union, Example)
method.
This value is used in VC-DRSA mode only.
It means that from among negative examples, a rule is allowed to cover only those that belong to positive region of a given union.public static final int COVER_ONLY_INCONSISTENT_AND_BOUNDARY_NEGATIVE_EXAMPLES
existsCoveringRule(Union, Example)
method.
This value is used in case of VC-DRSA mode only.
It means that from among negative examples,
a rule is allowed to cover only those that belong to a positive or boundary region of a given union.public static final int COVER_ANY_NEGATIVE_EXAMPLES
existsCoveringRule(Union, Example)
method.
This value is used only in VC-DRSA mode.
It means that a rule is allowed to cover any negative examples.public PreferenceGraphGeneratorVirtualAllRules(MemoryContainer informationTable, EvaluationDifference2PreferenceIntensityDegree evaluationDifference2PreferenceIntensityDegree, UnionContainer unionContainer, int typeOfRules, int consideredRelations, boolean calculateFuzzySatisfactionDegrees, int ruleConsistencyMeasure)
PreferenceGraphGeneratorVirtualAllRules
class,
which sets this generator to work in DRSA mode.
Converts given test information table to "full" PCT stored in this class (including all possible pairs of objects),
using (if present) given information about how to convert differences of evaluations on active condition cardinal criteria
present in test information table, to the degrees of the intensity of preference stored in PCT.
Conversion is done by means of
InformationTable2PCTConverter.convert(MemoryContainer, EvaluationDifference2PreferenceIntensityDegree)
method.PreferenceGraphGenerator(MemoryContainer, EvaluationDifference2PreferenceIntensityDegree, RulesContainer, int, int, boolean, int)
superclass constructor.informationTable
- test memory container storing objectsevaluationDifference2PreferenceIntensityDegree
- information about how to convert
differences of evaluations on active condition cardinal criteria present in test information table,
to the degrees of the intensity of preference stored in "full" PCTunionContainer
- union container created for learning PCT.
Approximations calculated for learning PCT are the basis for induction of rules from the set of ALL RULES.
Only robust (pair-based) rules are considered.typeOfRules
- Type of used rules from rules' container.
Can be Rule.CERTAIN
or Rule.POSSIBLE
.
For VC-DRSA only certain rules can be considered,
while for DRSA certain or possible rules can be considered.consideredRelations
- Tells whether at least and/or at most relations should be considered to generate preference graph.
Must be one of PreferenceGraphGenerator.AT_LEAST_RELATIONS
,
PreferenceGraphGenerator.AT_MOST_RELATIONS
or PreferenceGraphGenerator.AT_LEAST_AND_AT_MOST_RELATIONS
.calculateFuzzySatisfactionDegrees
- tells if fuzzy satisfaction degrees should be calculated when generating preference graph;
if false
, then for each at least / at most relation it is only checked
if there exists at least one rule that covers considered pair of objects
(and if so, then satisfaction degree is set to 1.0)ruleConsistencyMeasure
- Rule consistency measure used to evaluate quality of decision rules.
Can be one of: RuleConstants.UNDEFINED_RULE_CONSISTENCY_MEASURE
,
RuleConstants.MU_CONSISTENCY
, RuleConstants.EPSILON_CONSISTENCY
or RuleConstants.EPSILON_PRIM_CONSISTENCY
.java.lang.NullPointerException
- when union container is null
InvalidValueException
- when type of rules is possible,
the best value of rule consistency measure is taken into account
and rule consistency measure is RuleConstants.UNDEFINED_RULE_CONSISTENCY_MEASURE
or RuleConstants.MU_CONSISTENCY
public PreferenceGraphGeneratorVirtualAllRules(MemoryContainer informationTable, EvaluationDifference2PreferenceIntensityDegree evaluationDifference2PreferenceIntensityDegree, UnionContainer unionContainer, int consideredRelations, boolean calculateFuzzySatisfactionDegrees, int objectConsistencyMeasure, java.util.HashMap<Field,java.lang.Double> objectConsistencyMeasureUpwardThresholds, java.util.HashMap<Field,java.lang.Double> objectConsistencyMeasureDownwardThresholds, int negativeExamplesTreatment)
PreferenceGraphGeneratorVirtualAllRules
class,
which sets this generator to work in VC-DRSA mode with certain rules only,
using one of monotonic object consistency measures $\epsilon$, $\epsilon*$ or $\epsilon'$.
Converts given test information table to "full" PCT stored in this class (including all possible pairs of objects),
using (if present) given information about how to convert differences of evaluations on active condition cardinal criteria
present in test information table, to the degrees of the intensity of preference stored in PCT.
Conversion is done by means of
InformationTable2PCTConverter.convert(MemoryContainer, EvaluationDifference2PreferenceIntensityDegree)
method.PreferenceGraphGenerator(MemoryContainer, EvaluationDifference2PreferenceIntensityDegree, RulesContainer, int, int, boolean, int)
superclass constructor.informationTable
- test memory container storing objectsevaluationDifference2PreferenceIntensityDegree
- information about how to convert
differences of evaluations on active condition cardinal criteria present in test information table,
to the degrees of the intensity of preference stored in "full" PCTunionContainer
- union container created for learning PCT.
Approximations calculated for learning PCT are the basis for creation of rules from the set of ALL RULES.
Only robust (pair-based) rules are considered.consideredRelations
- Tells whether at least and/or at most relations should be considered to generate preference graph.
Must be one of PreferenceGraphGenerator.AT_LEAST_RELATIONS
,
PreferenceGraphGenerator.AT_MOST_RELATIONS
or PreferenceGraphGenerator.AT_LEAST_AND_AT_MOST_RELATIONS
.objectConsistencyMeasure
- monotonic object consistency measure used when calculating lower approximations
of upward/downward unions of classes from given union container.
Can be one of MonotonicUnion.EPSILON
, MonotonicUnion.EPSILON_STAR
, or MonotonicUnion.EPSILON_PRIM
.calculateFuzzySatisfactionDegrees
- tells if fuzzy satisfaction degrees should be calculated when generating preference graph;
if false
, then for each at least / at most relation it is only checked
if there exists at least one rule that covers considered pair of objects
(and if so, then satisfaction degree is set to 1.0)objectConsistencyMeasureUpwardThresholds
- Threshold values of chosen object consistency measure,
for upward unions present in the union container.
Keys in given map correspond to basic classes of upward unions distinguishable in given union container.
Each value in given map is an object consistency measure threshold for the upward union with respective basic class.objectConsistencyMeasureDownwardThresholds
- Threshold values of chosen object consistency measure,
for downward unions present in the union container.
Keys in given map correspond to basic classes of downward unions distinguishable in given union container.
Each value in given map is an object consistency measure threshold for the downward union with respective basic class.negativeExamplesTreatment
- Method of treatment for negative examples.
Can be one of COVER_ONLY_INCONSISTENT_NEGATIVE_EXAMPLES
,
COVER_ONLY_INCONSISTENT_AND_BOUNDARY_NEGATIVE_EXAMPLES
or COVER_ANY_NEGATIVE_EXAMPLES
.java.lang.NullPointerException
- when union container is null
,
when any of the lists of object consistency measure upward/downward thresholds is null
InvalidValueException
- when value of objectConsistencyMeasure
is none of
MonotonicUnion.EPSILON
, MonotonicUnion.EPSILON_STAR
, or MonotonicUnion.EPSILON_PRIM
,
when the number of object consistency measure upward/downward thresholds is incorrect,
when any object consistency measure upward or downward threshold is incorrect
(i.e., <0 for any object consistency measure, or >=1 for measures $\epsilon$, $\epsilon*$),
when given value of negative examples treatment is none of COVER_ONLY_INCONSISTENT_NEGATIVE_EXAMPLES
,
COVER_ONLY_INCONSISTENT_AND_BOUNDARY_NEGATIVE_EXAMPLES
and COVER_ANY_NEGATIVE_EXAMPLES
ValueNotFoundException
- when object consistency measure threshold is missing for any
upward/downward union from given union containerInvalidTypeException
- when given union container is not an instance of class MonotonicUnionContainer
public UnionContainer getUnionContainer()
public java.util.HashMap<Field,java.lang.Double> getObjectConsistencyMeasureUpwardThresholds()
objectConsistencyMeasureUpwardThresholds
public java.util.HashMap<Field,java.lang.Double> getObjectConsistencyMeasureDownwardThresholds()
objectConsistencyMeasureDownwardThresholds
public int getObjectConsistencyMeasure()
objectConsistencyMeasure
public int getNegativeExamplesTreatment()
negativeExamplesTreatment
public boolean isInDRSAMode()
true
if this generator works in DRSA mode, false
otherwisepublic boolean isInVCDRSAMode()
true
if this generator works in VC-DRSA mode, false
otherwisepublic void setFuzzySatisfactionDegreeCalculationMethod(int fuzzySatisfactionDegreeCalculationMethod)
setFuzzySatisfactionDegreeCalculationMethod
in class PreferenceGraphGenerator
fuzzySatisfactionDegreeCalculationMethod
- the method of calculating fuzzy satisfaction degrees of any at least / at most relation in generated preference graphInvalidValueException
- if the given method of calculating fuzzy satisfaction degrees is incorrectpublic PreferenceGraph generatePreferenceGraph()
Settings.getTypeOfFamilyOfCriteria()
value.generatePreferenceGraph
in class PreferenceGraphGenerator