RuleGenerationMode
RuleStatisticsOpt
public class RuleStatistics extends java.lang.Object implements RuleGenerationMode
getQuantityOfCoveredExamples()
, getQuantityOfCoveredExamplesFromTestMemoryContainer()
,
getNumbersOfCoveredExamples()
and getNumbersOfCoveredExamplesFromTestMemoryContainer()
methods for details.
Since rule may have no reference to learning memory container (e.g., after it has been read from file),
each method which calculates any statistic in context of that container checks if it is not null
and throws NullPointerException
if rule's learning memory container is not set.Modifier and Type | Field | Description |
---|---|---|
static int |
A_CONFIRMATION_MEASURE |
Possible parameter value for
statisticIsStored method |
static int |
C1_CONFIRMATION_MEASURE |
Possible parameter value for
statisticIsStored method |
static int |
CONFIDENCE |
Possible parameter value for
statisticIsStored method |
static int |
COVERAGE_FACTOR |
Possible parameter value for
statisticIsStored method |
static int |
EPSILON_PRIM_MEASURE |
Possible parameter value for
statisticIsStored method |
static int |
F_CONFIRMATION_MEASURE |
Possible parameter value for
statisticIsStored method |
static int |
INCONSISTENCY_MEASURE |
Possible parameter value for
statisticIsStored method |
static int |
L_CONFIRMATION_MEASURE |
Possible parameter value for
statisticIsStored method |
static int |
NUMBERS_OF_COVERED_EXAMPLES |
Possible parameter value for
statisticIsStored method |
static int |
NUMBERS_OF_COVERED_EXAMPLES_FROM_TEST_MEMORY_CONTAINER |
Possible parameter value for
statisticIsStored method |
static int |
NUMBERS_OF_NEGATIVE_COVERED_EXAMPLES |
Possible parameter value for
statisticIsStored method |
static int |
NUMBERS_OF_NEUTRAL_COVERED_EXAMPLES |
Possible parameter value for
statisticIsStored method |
static int |
NUMBERS_OF_SUPPORTING_EXAMPLES |
Possible parameter value for
statisticIsStored method |
static int |
QUANTITY_OF_COVERED_EXAMPLES |
Possible parameter value for
statisticIsStored method |
static int |
QUANTITY_OF_COVERED_EXAMPLES_FROM_TEST_MEMORY_CONTAINER |
Possible parameter value for
statisticIsStored method |
static int |
QUANTITY_OF_NEGATIVE_COVERED_EXAMPLES |
Possible parameter value for
statisticIsStored method |
static int |
QUANTITY_OF_NEUTRAL_COVERED_EXAMPLES |
Possible parameter value for
statisticIsStored method |
static int |
STRENGTH |
Possible parameter value for
statisticIsStored method |
static int |
SUPPORT |
Possible parameter value for
statisticIsStored method |
static double |
UNKNOWN_DOUBLE_VALUE |
Default value of all floating-point statistics, indicating that given statistic is unknown, i.e., it has not been calculated yet or
needs to be recalculated when needed
|
static int[] |
UNKNOWN_INT_ARRAY |
Default value of all statistics whose values are lists of
int examples' numbers,
indicating that given statistic is unknown, i.e., it has not been calculated yet or
needs to be recalculated when needed |
static int |
UNKNOWN_INT_VALUE |
Default value of all integer statistics, indicating that given statistic is unknown, i.e., it has not been calculated yet or
needs to be recalculated when needed
|
static int |
Z_CONFIRMATION_MEASURE |
Possible parameter value for
statisticIsStored method |
Constructor | Description |
---|---|
RuleStatistics(Rule rule) |
Constructor of the
RuleStatistics class. |
Modifier and Type | Method | Description |
---|---|---|
void |
enterRuleGenerationMode() |
Enters rule generation mode.
|
double |
getAConfirmationMeasureValue() |
Gets value of the confirmation measure A.
|
double |
getAlpha() |
Gets parameter alpha of confirmation measure c1.
|
double |
getBeta() |
Gets parameter beta of confirmation measure c1.
|
double |
getC1ConfirmationMeasureValue() |
Gets value of the confirmation measure c1.
|
double |
getConfidence() |
Gets confidence (credibility / certainty factor) of the rule in the context of rule's learning memory container.
|
static double |
getConfidence(int support,
int quantityOfCoveredExamples,
int quantityOfNeutralCoveredExamples) |
Gets confidence (credibility / certainty factor) of decision rule characterized by given support (quantity of supporting examples),
quantity of all covered examples (coverage), and quantity of neutral covered examples (neutral coverage).
|
double |
getConfidenceAssumingThatConditionIsAddedToRule(Condition condition) |
Gets confidence (credibility / certainty factor) of the rule in the context of rule's learning memory container, assuming that given condition is added to the rule.
|
double |
getCoverageFactor() |
Gets coverage factor of the rule in the context of rule's learning memory container.
|
double |
getEpsilonPrimMeasureValue() |
Gets value of the inconsistency measure $\epsilon'$
|
double |
getEpsilonPrimMeasureValueAssumingThatConditionIsAddedToRule(Condition condition) |
Gets value of the inconsistency measure $\epsilon'$, in the context of rule's learning memory container,
assuming that given condition is added to the rule.
|
double |
getFConfirmationMeasureValue() |
Gets value of the confirmation measure f
|
static double |
getGeneratedRuleMaximumEpsilonPrimMeasureValue(MemoryContainer learningMemoryContainer,
int approximatedEntitySize,
int numberOfNeutralExamples) |
Gets maximum value of $\epsilon'$ rule consistency measure that can be obtained by a generated rule (i.e., rule not in generation mode), given that this rule is induced for a given learning memory container,
for an approximated entity with give size, and in the circumstances when there is a given number of examples being neutral w.r.t. rule's approximated entity.
|
double |
getInconsistencyMeasureValue() |
Gets value of the inconsistency measure $\epsilon$
|
double |
getInconsistencyMeasureValueAssumingThatConditionIsAddedToRule(Condition condition) |
Gets value of the inconsistency measure $\epsilon$, in the context of rule's learning memory container,
assuming that given condition is added to the rule.
|
double |
getLConfirmationMeasureValue() |
Gets value of the confirmation measure l.
|
int[] |
getNumbersOfCoveredExamples() |
Gets numbers of those examples from rule's learning memory container which are covered by the rule.
|
int[] |
getNumbersOfCoveredExamplesAssumingThatConditionIsAddedToRule(Condition condition) |
Gets numbers of examples covered by the rule, in the context of its learning memory container, assuming that given condition is added to the rule.
|
int[] |
getNumbersOfCoveredExamplesFromTestMemoryContainer() |
Gets numbers of those examples from rule's test memory container which are covered by the rule.
|
int[] |
getNumbersOfNegativeCoveredExamples() |
In case of rule in generation mode, gets numbers of those examples from rule's learning memory container which are covered by the rule but
at the same time do not belong to the set of positive examples from learning memory container for which that rule is being induced.
|
int[] |
getNumbersOfNeutralCoveredExamples() |
Gets numbers of those examples from rule's learning memory container which are covered by the rule and are neutral to this rule.
|
int[] |
getNumbersOfSupportingExamples() |
Gets numbers of those examples from rule's learning memory container which support the rule.
|
int[] |
getNumbersOfSupportingExamplesAssumingThatConditionIsAddedToRule(Condition condition) |
Gets numbers of examples supporting the rule, in the context of its learning memory container, assuming that given condition is added to the rule.
|
int |
getQuantityOfConditions() |
Gets quantity of elementary conditions present on the left (condition) side of the rule
|
int |
getQuantityOfCoveredExamples() |
Gets absolute quantity of those examples from rule's learning memory container which are covered by the rule (coverage of the rule).
|
int |
getQuantityOfCoveredExamplesAssumingThatConditionIsAddedToRule(Condition condition) |
Gets quantity of examples covered by the rule, in the context of its learning memory container, assuming that given condition is added to the rule.
|
int |
getQuantityOfCoveredExamplesFromTestMemoryContainer() |
Gets absolute quantity of those examples from rule's test memory container which are covered by the rule (coverage of the rule).
|
int |
getQuantityOfDecisions() |
Gets quantity of elementary conditions present on the right (decision) side of the rule
|
int |
getQuantityOfNegativeCoveredExamples() |
In case of rule in generation mode, gets absolute quantity of all examples from rule's learning memory container
which are covered by the rule but at the same time do not belong to the set of positive examples
from learning memory container for which that rule is being induced.
|
int |
getQuantityOfNeutralCoveredExamples() |
Gets quantity of those examples from rule's learning memory container which are covered by the rule and are neutral to this rule.
|
int |
getQuantityOfNotNeutralCoveredExamplesAssumingThatConditionIsAddedToRule(Condition condition) |
Gets quantity of not neutral examples covered by the rule, in the context of its learning memory container, assuming that given condition is added to the rule.
|
Rule |
getRule() |
Gets rule for which these statistics are defined (gives direct access to that rule)
|
double |
getStrength() |
Gets strength of the rule in the context of rule's learning memory container.
|
int |
getSupport() |
Gets support of the rule in the context of its learning memory container.
|
int |
getSupportAssumingThatConditionIsAddedToRule(Condition condition) |
Gets support of the rule in the context of its learning memory container, assuming that given condition is added to the rule.
|
double |
getZConfirmationMeasureValue() |
Gets value of the confirmation measure Z.
|
boolean |
isInRuleGenerationMode() |
Tells if decision rule is in generation mode, i.e. if it can be extended by new conditions
during rule generation process
|
void |
leaveRuleGenerationMode() |
Leaves rule generation mode.
|
void |
reset() |
Resets all statistics stored in this object and causes that each first call to any 'get' method, which delivers
any statistic, will cause additional calculations before returning that statistic
|
void |
setAConfirmationMeasureValue(double aConfirmationMeasureValue) |
Sets value of the confirmation measure A.
In order to (re)set confirmation measure A to its default value pass UNKNOWN_DOUBLE_VALUE constant. |
void |
setAlpha(double alpha) |
Sets parameter alpha of confirmation measure c1.
|
void |
setBeta(double beta) |
Sets parameter beta of confirmation measure c1.
|
void |
setC1ConfirmationMeasureValue(double c1ConfirmationMeasureValue) |
Sets value of the confirmation measure c1.
In order to (re)set confirmation measure c1 to its default value pass UNKNOWN_DOUBLE_VALUE constant. |
void |
setConfidence(double confidence) |
Sets confidence (credibility / certainty factor) of the rule in the context of rule's learning memory container.
|
void |
setCoverageFactor(double coverageFactor) |
Sets coverage factor of the rule in the context of rule's learning memory container.
|
void |
setEpsilonPrimMeasureValue(double epsilonPrimMeasureValue) |
Sets value of the inconsistency measure $\epsilon'$.
In order to (re)set inconsistency measure to its default value pass UNKNOWN_DOUBLE_VALUE constant. |
void |
setFConfirmationMeasureValue(double fConfirmationMeasureValue) |
Sets value of the confirmation measure f.
In order to (re)set confirmation measure f to its default value pass UNKNOWN_DOUBLE_VALUE constant. |
void |
setInconsistencyMeasureValue(double inconsistencyMeasureValue) |
Sets value of the inconsistency measure $\epsilon$.
In order to (re)set inconsistency measure to its default value pass UNKNOWN_DOUBLE_VALUE constant. |
void |
setInitialStatistics(int[] numbersOfPositiveExamples,
int[] numbersOfApproximatedEntityExamples) |
Sets statistics of the rule with empty condition part.
|
void |
setLConfirmationMeasureValue(double lConfirmationMeasureValue) |
Sets value of the confirmation measure l.
In order to (re)set confirmation measure l to its default value pass UNKNOWN_DOUBLE_VALUE constant. |
void |
setNumbersOfCoveredExamples(int[] numbersOfCoveredExamples) |
Sets numbers of those examples from rule's learning memory container which are covered by the rule.
|
void |
setNumbersOfNegativeCoveredExamples(int[] numbersOfNegativeCoveredExamples) |
In case of rule in generation mode, sets numbers of those examples from rule's learning memory container which are covered by the rule but
at the same time do not belong to the set of positive examples from learning memory container for which that rule is being induced.
|
void |
setNumbersOfNeutralCoveredExamples(int[] numbersOfNeutralCoveredExamples) |
Sets numbers of those examples from rule's learning memory container which are covered by the rule and are neutral to this rule.
|
void |
setNumbersOfSupportingExamples(int[] numbersOfSupportingExamples) |
Sets numbers of those examples from rule's learning memory container which support the rule.
|
void |
setQuantityOfCoveredExamples(int quantityOfCoveredExamples) |
Sets absolute quantity of those examples from rule's learning memory container which are covered by the rule (coverage of the rule).
|
void |
setQuantityOfNegativeCoveredExamples(int quantityOfNegativeCoveredExamples) |
In case of rule in generation mode, sets absolute quantity of all examples from rule's learning memory container
which are covered by the rule but at the same time do not belong to the set of positive examples
from learning memory container for which that rule is being induced.
|
void |
setQuantityOfNeutralCoveredExamples(int quantityOfNeutralCoveredExamples) |
Sets quantity of those examples from rule's learning memory container which are covered by the rule and are neutral to this rule.
|
void |
setStrength(double strength) |
Sets strength of the rule in the context of rule's learning memory container.
|
void |
setSupport(int support) |
Sets support of the rule in the context of its learning memory container.
|
void |
setZConfirmationMeasureValue(double zConfirmationMeasureValue) |
Sets value of the confirmation measure Z.
In order to (re)set confirmation measure Z to its default value pass UNKNOWN_DOUBLE_VALUE constant. |
boolean |
statisticIsStored(int statisticName) |
Checks if statistic with given name is stored in this class.
|
java.lang.String |
toJAMMString() |
Gets textual, multiline form of these rule's statistics, in format required by JAMM application.
|
java.lang.String |
toShortString() |
Gets textual, multiline compact form of these rule's statistics.
|
java.lang.String |
toString() |
Gets textual, multiline form of these rule's statistics.
|
public static final int UNKNOWN_INT_VALUE
public static final double UNKNOWN_DOUBLE_VALUE
public static final int[] UNKNOWN_INT_ARRAY
int
examples' numbers,
indicating that given statistic is unknown, i.e., it has not been calculated yet or
needs to be recalculated when neededpublic static final int SUPPORT
statisticIsStored
methodpublic static final int NUMBERS_OF_SUPPORTING_EXAMPLES
statisticIsStored
methodpublic static final int STRENGTH
statisticIsStored
methodpublic static final int CONFIDENCE
statisticIsStored
methodpublic static final int COVERAGE_FACTOR
statisticIsStored
methodpublic static final int QUANTITY_OF_COVERED_EXAMPLES
statisticIsStored
methodpublic static final int QUANTITY_OF_COVERED_EXAMPLES_FROM_TEST_MEMORY_CONTAINER
statisticIsStored
methodpublic static final int NUMBERS_OF_COVERED_EXAMPLES
statisticIsStored
methodpublic static final int NUMBERS_OF_COVERED_EXAMPLES_FROM_TEST_MEMORY_CONTAINER
statisticIsStored
methodpublic static final int QUANTITY_OF_NEGATIVE_COVERED_EXAMPLES
statisticIsStored
methodpublic static final int NUMBERS_OF_NEGATIVE_COVERED_EXAMPLES
statisticIsStored
methodpublic static final int INCONSISTENCY_MEASURE
statisticIsStored
methodpublic static final int EPSILON_PRIM_MEASURE
statisticIsStored
methodpublic static final int F_CONFIRMATION_MEASURE
statisticIsStored
methodpublic static final int A_CONFIRMATION_MEASURE
statisticIsStored
methodpublic static final int Z_CONFIRMATION_MEASURE
statisticIsStored
methodpublic static final int L_CONFIRMATION_MEASURE
statisticIsStored
methodpublic static final int C1_CONFIRMATION_MEASURE
statisticIsStored
methodpublic static final int QUANTITY_OF_NEUTRAL_COVERED_EXAMPLES
statisticIsStored
methodpublic static final int NUMBERS_OF_NEUTRAL_COVERED_EXAMPLES
statisticIsStored
methodpublic RuleStatistics(Rule rule)
RuleStatistics
class.
Constructs rule's statistics for given rule.
Stores given rule reference directly in this class.
Updates given rule by setting its statistics object to this
(rule.setRuleStatistics(this)
).
Stores information if rule is in generation mode.rule
- reference to the rule for which these statistics are createdjava.lang.NullPointerException
- when rule is null
public void reset()
public int getSupport()
java.lang.NullPointerException
- when rule's learning memory container is not set and support needs to be calculated
because it is not already stored in this classpublic int getSupportAssumingThatConditionIsAddedToRule(Condition condition)
getSupport
method for more details.condition
- condition that may be added to rule for which these statistics are validjava.lang.NullPointerException
- when rule's learning memory container or given condition is null
public void setSupport(int support)
support
- support of the rule in the context of rule's learning memory container.
In order to (re)set support to its default value pass UNKNOWN_INT_VALUE
constant.InvalidValueException
- when support is smaller than zero
or when support is greater than quantity of examples in rule's learning memory container
(if that learning memory container is not null
)public int[] getNumbersOfSupportingExamples()
java.lang.NullPointerException
- when rule's learning memory container is not set and numbers of supporting examples
need to be calculated because they are not already stored in this classpublic int[] getNumbersOfSupportingExamplesAssumingThatConditionIsAddedToRule(Condition condition)
getNumbersOfSupportingExamples
method for more details.condition
- condition that may be added to rule for which these statistics are validjava.lang.NullPointerException
- when rule's learning memory container or given condition is null
public void setNumbersOfSupportingExamples(int[] numbersOfSupportingExamples)
null
).numbersOfSupportingExamples
- reference to the array with numbers of examples from
rule's learning memory container that support the rule or UNKNOWN_INT_ARRAY
constant
if numbers of supporting examples should be made unknownpublic double getStrength()
java.lang.NullPointerException
- when rule's learning memory container is not set and strength needs to be calculated
because it is not already stored in this classpublic void setStrength(double strength)
strength
- strength of the rule in the context of rule's learning memory container.
In order to (re)set strength to its default value pass UNKNOWN_DOUBLE_VALUE
constant.InvalidValueException
- when strength is outside [0, 1) rangepublic double getConfidence()
java.lang.NullPointerException
- when rule's learning memory container is not set and confidence needs to be calculated
because it is not already stored in this classpublic double getConfidenceAssumingThatConditionIsAddedToRule(Condition condition)
getConfidence
method for more details.condition
- condition that may be added to rule for which these statistics are validjava.lang.NullPointerException
- when rule's learning memory container or given condition is null
public static double getConfidence(int support, int quantityOfCoveredExamples, int quantityOfNeutralCoveredExamples)
support
- quantity of examples supporting decision rulequantityOfCoveredExamples
- quantity of all examples covered by decision rulequantityOfNeutralCoveredExamples
- quantity of those examples covered by decision rule which are neutral to this rulepublic static double getGeneratedRuleMaximumEpsilonPrimMeasureValue(MemoryContainer learningMemoryContainer, int approximatedEntitySize, int numberOfNeutralExamples)
learningMemoryContainer
- rule's learning memory containerapproximatedEntitySize
- size of the approximated entity (e.g., union of decision classes) for which the rule is assumed to be generatednumberOfNeutralExamples
- number of examples being neutral w.r.t. rule's approximated entitypublic void setConfidence(double confidence)
confidence
- confidence (credibility / certainty factor) of the rule in the context of rule's learning memory container.
In order to (re)set confidence to its default value pass UNKNOWN_DOUBLE_VALUE
constant.InvalidValueException
- when confidence is outside [0, 1] rangepublic double getCoverageFactor()
java.lang.NullPointerException
- when coverage factor needs to be calculated because it is not already stored in this class
and 1) rule's learning memory container is not set or 2) rule is in generation mode and rule's set of positive examples' numbers is not setpublic void setCoverageFactor(double coverageFactor)
coverageFactor
- coverage factor of the rule in the context of rule's learning memory container.
In order to (re)set coverage factor to its default value pass UNKNOWN_DOUBLE_VALUE
constant.InvalidValueException
- when coverage factor is outside [0, 1] rangepublic int getQuantityOfCoveredExamples()
java.lang.NullPointerException
- when rule's learning memory container is not set and quantity of covered examples
needs to be calculated because it is not already stored in this classpublic int getQuantityOfCoveredExamplesAssumingThatConditionIsAddedToRule(Condition condition)
getQuantityOfCoveredExamples
method for more details.condition
- condition that may be added to rule for which these statistics are validjava.lang.NullPointerException
- when rule's learning memory container or given condition is null
public int getQuantityOfNotNeutralCoveredExamplesAssumingThatConditionIsAddedToRule(Condition condition)
condition
- condition that may be added to rule for which these statistics are validjava.lang.NullPointerException
- when rule's learning memory container or given condition is null
or when rule's set of neutral examples' numbers is not setpublic void setQuantityOfCoveredExamples(int quantityOfCoveredExamples)
quantityOfCoveredExamples
- absolute quantity of those examples from rule's learning memory container
which are covered by the rule.
In order to (re)set quantity of covered examples to its default value pass UNKNOWN_INT_VALUE
constant.InvalidValueException
- when quantity of covered examples is smaller than zero
or when quantity of covered examples is greater than quantity of examples in rule's learning memory container
(if that learning memory container is not null
)public int getQuantityOfCoveredExamplesFromTestMemoryContainer()
java.lang.NullPointerException
- when rule's test memory container is not set (is equal to null
)public int[] getNumbersOfCoveredExamples()
java.lang.NullPointerException
- when rule's learning memory container is not set and numbers of covered examples
need to be calculated because they are not already stored in this classpublic int[] getNumbersOfCoveredExamplesAssumingThatConditionIsAddedToRule(Condition condition)
getNumbersOfCoveredExamples
method for more details.condition
- condition that may be added to rule for which these statistics are validjava.lang.NullPointerException
- when rule's learning memory container or given condition is null
public void setNumbersOfCoveredExamples(int[] numbersOfCoveredExamples)
null
).numbersOfCoveredExamples
- reference to the array with numbers of those examples from rule's
learning memory container which are covered by the rule or UNKNOWN_INT_ARRAY
constant
if numbers of covered examples should be made unknownpublic int[] getNumbersOfCoveredExamplesFromTestMemoryContainer()
java.lang.NullPointerException
- when rule's test memory container is not set (is equal to null
)public int getQuantityOfNegativeCoveredExamples()
java.lang.NullPointerException
- when quantity of negative covered examples needs to be calculated because it is not already stored in this class
and at the same time:null
)null
) and numbers of covered examples are not already stored in this classpublic void setQuantityOfNegativeCoveredExamples(int quantityOfNegativeCoveredExamples)
quantityOfNegativeCoveredExamples
- absolute quantity of negative covered examples from rule's learning memory container.
In order to (re)set quantity of negative covered examples to its default value pass UNKNOWN_INT_VALUE
constant.InvalidValueException
- when quantity of negative covered examples is smaller than zero
or when quantity of negative covered examples is greater than quantity of examples in rule's learning memory container
(if that learning memory container is not null
)public int[] getNumbersOfNegativeCoveredExamples()
java.lang.NullPointerException
- when numbers of negative covered examples need to be calculated because they are not already stored in this class
and at the same time:null
)null
) and numbers of covered examples are not already stored in this classpublic void setNumbersOfNegativeCoveredExamples(int[] numbersOfNegativeCoveredExamples)
null
).numbersOfNegativeCoveredExamples
- numbers of negative covered examples from rule's learning memory container.
Can also be equal to UNKNOWN_INT_ARRAY
constant if numbers of negative covered examples should be made unknown.public int getQuantityOfNeutralCoveredExamples()
java.lang.NullPointerException
- when quantity of neutral covered examples needs to be calculated because it is not already stored in this class
and at the same time:null
)null
) and numbers of covered examples are not already stored in this classpublic void setQuantityOfNeutralCoveredExamples(int quantityOfNeutralCoveredExamples)
quantityOfNeutralCoveredExamples
- quantity of those examples from rule's learning memory container which are covered by the rule and are neutral to this ruleInvalidValueException
- when quantity of neutral covered examples is smaller than zero
or when quantity of neutral covered examples is greater than quantity of examples in rule's learning memory container
(if that learning memory container is not null
)public int[] getNumbersOfNeutralCoveredExamples()
java.lang.NullPointerException
- when numbers of neutral covered examples needs to be calculated because they are not already stored in this class
and at the same time:null
)null
) and numbers of covered examples are not already stored in this classpublic void setNumbersOfNeutralCoveredExamples(int[] numbersOfNeutralCoveredExamples)
null
).numbersOfNeutralCoveredExamples
- numbers of neutral covered examples from rule's learning memory container.
Can also be equal to UNKNOWN_INT_ARRAY
constant if numbers of neutral covered examples should be made unknown.public double getInconsistencyMeasureValue()
java.lang.NullPointerException
- when inconsistency measure value needs to be calculated because it is not already stored in this class
and rule's learning memory container is not set (== null
)java.lang.NullPointerException
- when inconsistency measure value needs to be calculated because it is not already stored in this classnull
)null
)java.lang.NullPointerException
- when the size of approximated entity for which the rule has been created
is not already stored in the rule (so it needs to be calculated)
and rule's learning memory container is null
InvalidValueException
- when the size of approximated entity for which the rule has been created
is not already stored in the rule (so it needs to be calculated)
and rule's learning memory container does not contain exactly one active decision attributepublic double getInconsistencyMeasureValueAssumingThatConditionIsAddedToRule(Condition condition)
getInconsistencyMeasureValue
method for more details.condition
- condition that may be added to rule for which these statistics are validjava.lang.NullPointerException
- when given condition or rule's learning memory container is null
java.lang.NullPointerException
- when quantity / numbers of negative covered examples needs / need to be calculated because it is / they are not already stored in this classnull
)null
)java.lang.NullPointerException
- when the size of approximated entity for which the rule has been created
is not already stored in the rule (so it needs to be calculated)
and rule's learning memory container is null
InvalidValueException
- when the size of approximated entity for which the rule has been created
is not already stored in the rule (so it needs to be calculated)
and rule's learning memory container does not contain exactly one active decision attributepublic void setInconsistencyMeasureValue(double inconsistencyMeasureValue)
UNKNOWN_DOUBLE_VALUE
constant.inconsistencyMeasureValue
- value of the inconsistency measure $\epsilon$InvalidValueException
- when given value of the inconsistency measure is smaller than zeropublic double getEpsilonPrimMeasureValue()
java.lang.NullPointerException
- when inconsistency measure value needs to be calculated because it is not already stored in this class
and rule's learning memory container is not set (== null
)java.lang.NullPointerException
- when inconsistency measure value needs to be calculated because it is not already stored in this classnull
)null
)java.lang.NullPointerException
- when the size of approximated entity for which the rule has been created
is not already stored in the rule (so it needs to be calculated)
and rule's learning memory container is null
InvalidValueException
- when the size of approximated entity for which the rule has been created
is not already stored in the rule (so it needs to be calculated)
and rule's learning memory container does not contain exactly one active decision attributepublic double getEpsilonPrimMeasureValueAssumingThatConditionIsAddedToRule(Condition condition)
getEpsilonPrimMeasureValue
method for more details.condition
- condition that may be added to rule for which these statistics are validjava.lang.NullPointerException
- when given condition or rule's learning memory container is null
java.lang.NullPointerException
- when quantity / numbers of negative covered examples needs / need to be calculated because it is / they are not already stored in this classnull
)null
)java.lang.NullPointerException
- when the size of approximated entity for which the rule has been created
is not already stored in the rule (so it needs to be calculated)
and rule's learning memory container is null
InvalidValueException
- when the size of approximated entity for which the rule has been created
is not already stored in the rule (so it needs to be calculated)
and rule's learning memory container does not contain exactly one active decision attributepublic void setEpsilonPrimMeasureValue(double epsilonPrimMeasureValue)
UNKNOWN_DOUBLE_VALUE
constant.epsilonPrimMeasureValue
- value of the inconsistency measure $\epsilon'$InvalidValueException
- when given value of the inconsistency measure is smaller than zeropublic double getFConfirmationMeasureValue()
java.lang.NullPointerException
- see getSupport()
, getQuantityOfPositiveNotCoveredExamples()
,
getQuantityOfNegativeCoveredExamples()
and getQuantityOfNegativeNotCoveredExamples()
methods.InvalidValueException
- see getQuantityOfPositiveNotCoveredExamples()
and getQuantityOfNegativeNotCoveredExamples()
methods.public void setFConfirmationMeasureValue(double fConfirmationMeasureValue)
UNKNOWN_DOUBLE_VALUE
constant.fConfirmationMeasureValue
- value of the confirmation measure fInvalidValueException
- when given value of the confirmation measure f is incorrect TODO correct descriptionpublic double getAConfirmationMeasureValue()
java.lang.NullPointerException
- see getSupport()
, getQuantityOfPositiveNotCoveredExamples()
,
getQuantityOfNegativeCoveredExamples()
and getQuantityOfNegativeNotCoveredExamples()
methods.InvalidValueException
- see getQuantityOfPositiveNotCoveredExamples()
and getQuantityOfNegativeNotCoveredExamples()
methods.public void setAConfirmationMeasureValue(double aConfirmationMeasureValue)
UNKNOWN_DOUBLE_VALUE
constant.aConfirmationMeasureValue
- value of the confirmation measure AInvalidValueException
- when given value of the confirmation measure A is outside [-1,1] intervalpublic double getZConfirmationMeasureValue()
java.lang.NullPointerException
- see getSupport()
, getQuantityOfPositiveNotCoveredExamples()
,
getQuantityOfNegativeCoveredExamples()
and getQuantityOfNegativeNotCoveredExamples()
methods.InvalidValueException
- see getQuantityOfPositiveNotCoveredExamples()
and getQuantityOfNegativeNotCoveredExamples()
methods.public void setZConfirmationMeasureValue(double zConfirmationMeasureValue)
UNKNOWN_DOUBLE_VALUE
constant.zConfirmationMeasureValue
- value of the confirmation measure ZInvalidValueException
- when given value of the confirmation measure Z is outside [-1,1] intervalpublic double getLConfirmationMeasureValue()
java.lang.NullPointerException
- see getSupport()
, getQuantityOfPositiveNotCoveredExamples()
,
getQuantityOfNegativeCoveredExamples()
and getQuantityOfNegativeNotCoveredExamples()
methods.InvalidValueException
- see getQuantityOfPositiveNotCoveredExamples()
and getQuantityOfNegativeNotCoveredExamples()
methods.public void setLConfirmationMeasureValue(double lConfirmationMeasureValue)
UNKNOWN_DOUBLE_VALUE
constant.lConfirmationMeasureValue
- value of the confirmation measure lInvalidValueException
- when given value of the confirmation measure l is incorrect TODO correct descriptionpublic double getC1ConfirmationMeasureValue()
java.lang.NullPointerException
- see getSupport()
, getQuantityOfPositiveNotCoveredExamples()
,
getQuantityOfNegativeCoveredExamples()
and getQuantityOfNegativeNotCoveredExamples()
methods.InvalidValueException
- see getQuantityOfPositiveNotCoveredExamples()
and getQuantityOfNegativeNotCoveredExamples()
methods.public void setC1ConfirmationMeasureValue(double c1ConfirmationMeasureValue)
UNKNOWN_DOUBLE_VALUE
constant.c1ConfirmationMeasureValue
- value of the confirmation measure c1InvalidValueException
- when given value of the confirmation measure c1 is incorrect TODO correct descriptionpublic int getQuantityOfConditions()
public int getQuantityOfDecisions()
public Rule getRule()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toShortString()
public java.lang.String toJAMMString()
public boolean statisticIsStored(int statisticName)
statisticName
- name of the statistic to check. Must be one of the following public constants from this class:SUPPORT
NUMBERS_OF_SUPPORTING_EXAMPLES
STRENGTH
CONFIDENCE
COVERAGE_FACTOR
QUANTITY_OF_COVERED_EXAMPLES
QUANTITY_OF_COVERED_EXAMPLES_FROM_TEST_MEMORY_CONTAINER
NUMBERS_OF_COVERED_EXAMPLES
NUMBERS_OF_COVERED_EXAMPLES_FROM_TEST_MEMORY_CONTAINER
QUANTITY_OF_NEGATIVE_COVERED_EXAMPLES
NUMBERS_OF_NEGATIVE_COVERED_EXAMPLES
INCONSISTENCY_MEASURE
EPSILON_PRIM_MEASURE
F_CONFIRMATION_MEASURE
A_CONFIRMATION_MEASURE
Z_CONFIRMATION_MEASURE
L_CONFIRMATION_MEASURE
QUANTITY_OF_NEUTRAL_COVERED_EXAMPLES
NUMBERS_OF_NEUTRAL_COVERED_EXAMPLES
true
if statistic with given name is stored in this class, false
otherwiseInvalidValueException
- when name of the statistic is incorrectpublic boolean isInRuleGenerationMode()
isInRuleGenerationMode
in interface RuleGenerationMode
true
if rule is in generation process,
i.e. it can still be extended by new conditions, false
otherwisepublic void enterRuleGenerationMode()
enterRuleGenerationMode
in interface RuleGenerationMode
public void leaveRuleGenerationMode()
leaveRuleGenerationMode
in interface RuleGenerationMode
public double getAlpha()
public void setAlpha(double alpha)
alpha
- parameter alpha of confirmation measure c1.public double getBeta()
public void setBeta(double beta)
beta
- parameter beta of confirmation measure c1public void setInitialStatistics(int[] numbersOfPositiveExamples, int[] numbersOfApproximatedEntityExamples)
numbersOfPositiveExamples
- array with numbers of rule's positive examplesnumbersOfApproximatedEntityExamples
- array with numbers of examples belonging to the approximated entity
for which the rule is generated