|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectclarion.system.RuleRefiner
public final class RuleRefiner
This class implements a rule refiner within CLARION.
Usage:
This class contains static methods used to handle the refinement (generalization and specialization) of any rules that extend the RefineableRule class.
The rule refiner has two options for calculating information gain (as part of rule refinement). Those options are:
The first option is just the standard formula for calculating information gain. The second method method is the equivalent to: IG(A, Perfect) where "Perfect" is assumed to be a rule that has perfect match statistics (all positive). When a rule is considered "perfect", the log equation that is used to calculate information gain for that rule will approach 0. Therefore this method for calculating information gain needs to only calculate the log equation for the rule A.
Classes that currently instantiate a rule extractor are:
This class contains both global (static) and local constants. The default is to use the local constants. If you want to change any of the global constants, you need to do so before any instances of this class are initialized.
Nested Class Summary | |
---|---|
static class |
RuleRefiner.IG_OPTIONS
The options that can be used when calculating information gain for IG(C,ALL) |
Field Summary | |
---|---|
double |
C1
Constant for Information Gain |
double |
C2
Constant for Information Gain |
double |
GENERALIZATION_THRESHOLD1
The threshold IG(C,All) must pass for a rule to be generalized |
double |
GENERALIZATION_THRESHOLD2
The threshold IG(C',C) must pass for a rule to be generalized |
static double |
GLOABAL_C2
Constant for Information Gain |
static double |
GLOBAL_C1
Constant for Information Gain |
static double |
GLOBAL_GENERALIZATION_THRESHOLD1
The threshold IG(C,All) must pass for a rule to be generalized |
static double |
GLOBAL_GENERALIZATION_THRESHOLD2
The threshold IG(C',C) must pass for a rule to be generalized |
static RuleRefiner.IG_OPTIONS |
GLOBAL_IG_OPTION
The option to use when calculation information gain for IG(C,ALL) |
static double |
GLOBAL_SPECIALIZATION_THRESHOLD1
The threshold IG(C,All) must be below for a rule to be specialized |
static double |
GLOBAL_SPECIALIZATION_THRESHOLD2
The threshold IG(C',C) must be below for a rule to be specialized |
RuleRefiner.IG_OPTIONS |
IG_OPTION
The option to use when calculation information gain for IG(C,ALL) |
double |
SPECIALIZATION_THRESHOLD1
The threshold IG(C,All) must be below for a rule to be specialized |
double |
SPECIALIZATION_THRESHOLD2
The threshold IG(C',C) must be below for a rule to be specialized |
Constructor Summary | |
---|---|
RuleRefiner()
|
Method Summary | |
---|---|
double |
calculateInformationGain(AbstractRule A)
Calculates the information gain using the match statistics of the specified rule. |
double |
calculateInformationGain(AbstractRule A,
AbstractRule B)
Calculates the information gain using the match statistics of two specified rules. |
AbstractRule |
generalize(AbstractRule R)
Generalizes the specified rule (if possible). |
AbstractRule |
specialize(AbstractRule R)
Specializes the specified rule (if possible). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static RuleRefiner.IG_OPTIONS GLOBAL_IG_OPTION
public RuleRefiner.IG_OPTIONS IG_OPTION
public static double GLOBAL_GENERALIZATION_THRESHOLD1
public double GENERALIZATION_THRESHOLD1
public static double GLOBAL_GENERALIZATION_THRESHOLD2
public double GENERALIZATION_THRESHOLD2
public static double GLOBAL_SPECIALIZATION_THRESHOLD1
public double SPECIALIZATION_THRESHOLD1
public static double GLOBAL_SPECIALIZATION_THRESHOLD2
public double SPECIALIZATION_THRESHOLD2
public static double GLOBAL_C1
public static double GLOABAL_C2
public double C1
public double C2
Constructor Detail |
---|
public RuleRefiner()
Method Detail |
---|
public AbstractRule generalize(AbstractRule R)
R
- The rule to Generalize.
public AbstractRule specialize(AbstractRule R)
R
- The rule to specialize.
public double calculateInformationGain(AbstractRule A, AbstractRule B)
A
- The first rule.B
- The second rule.
public double calculateInformationGain(AbstractRule A)
A
- The rule to use for calculating information gain against the "perfect" rule.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |