PreferenceGraphGeneratorVirtualAllRules
public class PreferenceGraphGenerator
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static int |
AT_LEAST_AND_AT_MOST_RELATIONS |
Possible value of
consideredRelations class constructor parameter,
used when both at least and at most relations are considered |
static int |
AT_LEAST_RELATIONS |
Possible value of
consideredRelations class constructor parameter,
used when only at least relations are considered |
static int |
AT_MOST_RELATIONS |
Possible value of
consideredRelations class constructor parameter,
used when only at most relations are considered |
static int |
DEFAULT_FUZZY_SATISFACTION_DEGREE_CALCULATION_METHOD |
Default calculation method of fuzzy satisfaction degrees of at least /at most relations.
|
static int |
MAX_CREDIBILITY |
Possible value of
fuzzySatisfactionDegreeCalculationMethod , denoting that each fuzzy satisfaction degree of any at least / at most relation
in generated preference graph is determined by maximum credibility (best value of used rule consistency measure) among at least / at most certain / possible
rules covering given pair of objects. |
static int |
MAX_PRODUCT_OF_CREDIBILITY_AND_COVERAGE_FACTOR |
Possible value of
fuzzySatisfactionDegreeCalculationMethod , denoting that each fuzzy satisfaction degree of any at least / at most relation
in generated preference graph is calculated using the maximum product of credibility and coverage factor among at least / at most certain / possible
rules covering given pair of objects. |
boolean |
superviseConstructionOfPreferenceGraph |
Tells if the construction of this preference graph should be supervised in
generatePreferenceGraph() method for the case of outranking / non-outranking decision rules. |
static boolean |
throwExceptionWhenAllPossibleDecisionAttributeValuesAreNotStoredInRulesContainer |
Tells if
NullPointerException should be thrown when rules' container does not contain the list
of all possible values of decision attribute (RulesContainer.getClasses() method returns null ). |
Constructor | Description |
---|---|
PreferenceGraphGenerator(MemoryContainer informationTable,
EvaluationDifference2PreferenceIntensityDegree evaluationDifference2PreferenceIntensityDegree,
RulesContainer rulesContainer,
int typeOfRules,
int consideredRelations,
boolean calculateFuzzySatisfactionDegrees,
int ruleConsistencyMeasure) |
Constructor for
PreferenceGraphGenerator class. |
Modifier and Type | Method | Description |
---|---|---|
PreferenceGraph |
generatePreferenceGraph() |
Gets preference graph resulting from application of rules from rules container
to all pairs of objects from test information table.
Takes into account Settings.getTypeOfFamilyOfCriteria() value. |
int |
getConsideredRelations() |
Tells whether at least and/or at most relations should be considered to generate preference graph.
|
MemoryContainer |
getFullPct() |
Gets test "full" PCT stored in this class
|
int |
getFuzzySatisfactionDegreeCalculationMethod() |
Gets the method of calculating fuzzy satisfaction degrees of any at least / at most relation in generated preference graph.
|
MemoryContainer |
getInformationTable() |
Gets test information table stored in this class
|
int |
getRuleConsistencyMeasure() |
Gets rule consistency measure used to evaluate quality of decision rules.
|
RulesContainer |
getRulesContainer() |
Gets rules container stored in this class
|
int |
getTypeOfRules() |
Gets type of used rules from rules' container
|
boolean |
isCalculateFuzzySatisfactionDegrees() |
Tells if fuzzy satisfaction degrees should be calculated when generating preference graph.
|
void |
setFuzzySatisfactionDegreeCalculationMethod(int fuzzySatisfactionDegreeCalculationMethod) |
Sets the method of calculating fuzzy satisfaction degrees of any at least / at most relation in generated preference graph.
|
public static final int AT_LEAST_RELATIONS
consideredRelations
class constructor parameter,
used when only at least relations are consideredpublic static final int AT_MOST_RELATIONS
consideredRelations
class constructor parameter,
used when only at most relations are consideredpublic static final int AT_LEAST_AND_AT_MOST_RELATIONS
consideredRelations
class constructor parameter,
used when both at least and at most relations are consideredpublic static boolean throwExceptionWhenAllPossibleDecisionAttributeValuesAreNotStoredInRulesContainer
NullPointerException
should be thrown when rules' container does not contain the list
of all possible values of decision attribute (RulesContainer.getClasses()
method returns null
).
Values of decision attribute are treated as rules' reference values.
Initialized with true
.public static final int MAX_CREDIBILITY
fuzzySatisfactionDegreeCalculationMethod
, denoting that each fuzzy satisfaction degree of any at least / at most relation
in generated preference graph is determined by maximum credibility (best value of used rule consistency measure) among at least / at most certain / possible
rules covering given pair of objects.public static final int MAX_PRODUCT_OF_CREDIBILITY_AND_COVERAGE_FACTOR
fuzzySatisfactionDegreeCalculationMethod
, denoting that each fuzzy satisfaction degree of any at least / at most relation
in generated preference graph is calculated using the maximum product of credibility and coverage factor among at least / at most certain / possible
rules covering given pair of objects.public static final int DEFAULT_FUZZY_SATISFACTION_DEGREE_CALCULATION_METHOD
MAX_CREDIBILITY
.public boolean superviseConstructionOfPreferenceGraph
generatePreferenceGraph()
method for the case of outranking / non-outranking decision rules.
Supervision depends on the setting Settings.getTypeOfFamilyOfCriteria()
, on the type of satisfaction degrees in this graph (crisp or fuzzy), i.e., on the value calculateFuzzySatisfactionDegrees
,
and on the type of decision rules (certain/possible), i.e., on the value typeOfRules
.true
.public PreferenceGraphGenerator(MemoryContainer informationTable, EvaluationDifference2PreferenceIntensityDegree evaluationDifference2PreferenceIntensityDegree, RulesContainer rulesContainer, int typeOfRules, int consideredRelations, boolean calculateFuzzySatisfactionDegrees, int ruleConsistencyMeasure)
PreferenceGraphGenerator
class.
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.
Rules' container may be null
, which means that rules are not used explicitly.
Assumes that if rules' container is not null
, then rules from rules' container have syntax appropriate for PCT (for pairs of objects).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 test "full" PCTrulesContainer
- Rules container storing decision rules that can be applied to pairs of objects from PCT.
Can be null
, which means that rules container is not used explicitly.typeOfRules
- Type of used rules from rules' container.
Can be Rule.CERTAIN
or Rule.POSSIBLE
.
For VC-DRSA only certain rules are considered,
while for DRSA both certain and possible rules may be considered.consideredRelations
- Tells whether at least and/or at most relations should be considered when generating preference graph.
Must be one of AT_LEAST_RELATIONS
, AT_MOST_RELATIONS
or 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 decision rules.RuleConstants.UNDEFINED_RULE_CONSISTENCY_MEASURE
, RuleConstants.MU_CONSISTENCY
,
RuleConstants.EPSILON_CONSISTENCY
or RuleConstants.EPSILON_PRIM_CONSISTENCY
.RuleConstants.UNDEFINED_RULE_CONSISTENCY_MEASURE
when:InvalidValueException
- when one of the following occurs:Rule.CERTAIN
nor Rule.POSSIBLE
consideredRelations
is none of AT_LEAST_RELATIONS
,
AT_MOST_RELATIONS
and AT_LEAST_AND_AT_MOST_RELATIONS
null
,
but rules container does not store a list of certain/possible at least rulesnull
,
but rules container does not store a list of certain/possible at most rulesRuleConstants.UNDEFINED_RULE_CONSISTENCY_MEASURE
,
RuleConstants.MU_CONSISTENCY
, RuleConstants.EPSILON_CONSISTENCY
and RuleConstants.EPSILON_PRIM_CONSISTENCY
public MemoryContainer getInformationTable()
public MemoryContainer getFullPct()
public RulesContainer getRulesContainer()
public int getTypeOfRules()
public int getConsideredRelations()
AT_LEAST_RELATIONS
, AT_MOST_RELATIONS
or AT_LEAST_AND_AT_MOST_RELATIONS
.public boolean isCalculateFuzzySatisfactionDegrees()
true
if fuzzy satisfaction degrees should be calculated when generating preference graph;
false
otherwisepublic int getFuzzySatisfactionDegreeCalculationMethod()
public void setFuzzySatisfactionDegreeCalculationMethod(int fuzzySatisfactionDegreeCalculationMethod)
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 int getRuleConsistencyMeasure()
public PreferenceGraph generatePreferenceGraph()
Settings.getTypeOfFamilyOfCriteria()
value.
TODO - more effective implementation, using order of at least / at most decision rules
and PreferenceGraph.setAtLeastRelationSatisfactionDegrees
,
PreferenceGraph.setAtMostRelationSatisfactionDegrees
methods.java.lang.NullPointerException
- when rules container is null
or when throwExceptionWhenAllPossibleDecisionAttributeValuesAreNotStoredInRulesContainer
is true
and rules' container does not contain the list of all possible decision attribute valuesInvalidValueException
- when fuzzy satisfaction degrees should be calculated but rule consistency measure is undefined.InvalidTypeException
- when decision condition of any considered rule is not an instance of DecisionCondition