nl.liacs.subdisc
Class QualityMeasure

java.lang.Object
  extended by nl.liacs.subdisc.QualityMeasure

public class QualityMeasure
extends java.lang.Object

The QualityMeasure class includes all quality measures used (contingency table).


Field Summary
static int ABS_MEAN_TEST
           
static int ABS_T_TEST
           
static int ABS_WMW_RANKS
           
static int ABS_Z_SCORE
           
static int ABSNOVELTY
           
static int ACCURACY
           
static int AUC
           
static int AVERAGE
           
static int CHI_SQUARED
           
static int CHI2_TEST
           
static int COOKS_DISTANCE
           
static int CORRELATION
           
static int CORRELATION_DISTANCE
           
static int CORRELATION_ENTROPY
           
static int CORRELATION_P
           
static int CORRELATION_R
           
static int CORRELATION_R_NEG
           
static int CORRELATION_R_NEG_SQ
           
static int CORRELATION_R_SQ
           
static int COVERAGE
           
static int EDIT_DISTANCE
           
static int F_MEASURE
           
static int G_MEASURE
           
static int INFORMATION_GAIN
           
static int INVERSE_AVERAGE
           
static int INVERSE_MEAN_TEST
           
static int INVERSE_T_TEST
           
static int INVERSE_WMW_RANKS
           
static int INVERSE_Z_SCORE
           
static int JACCARD
           
static int LAPLACE
           
static int LINEAR_REGRESSION
           
static int MEAN_TEST
           
static int MMAD
           
static int NOVELTY
           
static int PURITY
           
static int SENSITIVITY
           
static int SPECIFICITY
           
static int T_TEST
           
static int WEED
           
static int WMW_RANKS
           
static int Z_SCORE
           
 
Constructor Summary
QualityMeasure(int theMeasure, int theTotalCoverage, float theTotalSum, float theTotalSSD, float theTotalMedian, float theTotalMedianAD)
           
QualityMeasure(int theMeasure, int theTotalCoverage, int theTotalTargetCoverage)
           
QualityMeasure(SearchParameters theSearchParameters, DAG theDAG, int theNrRecords)
           
 
Method Summary
 float calculate(int theCoverage, float theSum, float theSSD, float theMedian, float theMedianAD, int[] theSubgroupCounts)
           
 float calculate(int theCountHeadBody, int theCoverage)
          Contingency table:
B B H n(HB) n(HB) n(H) Hn(HB) n(HB) n(H) n(B) n(B) N
static float calculate(int theMeasure, int theTotalCoverage, int theTotalTargetCoverage, int theCountHeadBody, int theCoverage)
           
 float calculate(Subgroup theSubgroup)
           
static float calculateConditionalEntropy(float bodySupport, float bodyHeadSupport)
          Calculates the ConditionalEntropy.
 float calculateEditDistance(DAG theDAG)
           
static float calculateEntropy(float bodySupport, float headBodySupport)
           
static float calculateInformationGain(float totalSupport, float headSupport, float bodySupport, float headBodySupport)
           
static int getFirstEvaluationMeasure(TargetType theTargetType)
           
static int getLastEvaluationMesure(TargetType theTargetType)
           
static int getMeasureCode(java.lang.String theEvaluationMeasure)
           
static java.lang.String getMeasureMinimum(java.lang.String theEvaluationMeasure, float theAverage)
           
static java.lang.String getMeasureString(int aEvaluationMeasure)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOVELTY

public static final int NOVELTY
See Also:
Constant Field Values

ABSNOVELTY

public static final int ABSNOVELTY
See Also:
Constant Field Values

CHI_SQUARED

public static final int CHI_SQUARED
See Also:
Constant Field Values

INFORMATION_GAIN

public static final int INFORMATION_GAIN
See Also:
Constant Field Values

ACCURACY

public static final int ACCURACY
See Also:
Constant Field Values

PURITY

public static final int PURITY
See Also:
Constant Field Values

JACCARD

public static final int JACCARD
See Also:
Constant Field Values

COVERAGE

public static final int COVERAGE
See Also:
Constant Field Values

SPECIFICITY

public static final int SPECIFICITY
See Also:
Constant Field Values

SENSITIVITY

public static final int SENSITIVITY
See Also:
Constant Field Values

LAPLACE

public static final int LAPLACE
See Also:
Constant Field Values

F_MEASURE

public static final int F_MEASURE
See Also:
Constant Field Values

G_MEASURE

public static final int G_MEASURE
See Also:
Constant Field Values

CORRELATION

public static final int CORRELATION
See Also:
Constant Field Values

Z_SCORE

public static final int Z_SCORE
See Also:
Constant Field Values

INVERSE_Z_SCORE

public static final int INVERSE_Z_SCORE
See Also:
Constant Field Values

ABS_Z_SCORE

public static final int ABS_Z_SCORE
See Also:
Constant Field Values

AVERAGE

public static final int AVERAGE
See Also:
Constant Field Values

INVERSE_AVERAGE

public static final int INVERSE_AVERAGE
See Also:
Constant Field Values

MEAN_TEST

public static final int MEAN_TEST
See Also:
Constant Field Values

INVERSE_MEAN_TEST

public static final int INVERSE_MEAN_TEST
See Also:
Constant Field Values

ABS_MEAN_TEST

public static final int ABS_MEAN_TEST
See Also:
Constant Field Values

T_TEST

public static final int T_TEST
See Also:
Constant Field Values

INVERSE_T_TEST

public static final int INVERSE_T_TEST
See Also:
Constant Field Values

ABS_T_TEST

public static final int ABS_T_TEST
See Also:
Constant Field Values

CHI2_TEST

public static final int CHI2_TEST
See Also:
Constant Field Values

AUC

public static final int AUC
See Also:
Constant Field Values

WMW_RANKS

public static final int WMW_RANKS
See Also:
Constant Field Values

INVERSE_WMW_RANKS

public static final int INVERSE_WMW_RANKS
See Also:
Constant Field Values

ABS_WMW_RANKS

public static final int ABS_WMW_RANKS
See Also:
Constant Field Values

MMAD

public static final int MMAD
See Also:
Constant Field Values

WEED

public static final int WEED
See Also:
Constant Field Values

EDIT_DISTANCE

public static final int EDIT_DISTANCE
See Also:
Constant Field Values

CORRELATION_R

public static final int CORRELATION_R
See Also:
Constant Field Values

CORRELATION_R_NEG

public static final int CORRELATION_R_NEG
See Also:
Constant Field Values

CORRELATION_R_NEG_SQ

public static final int CORRELATION_R_NEG_SQ
See Also:
Constant Field Values

CORRELATION_R_SQ

public static final int CORRELATION_R_SQ
See Also:
Constant Field Values

CORRELATION_DISTANCE

public static final int CORRELATION_DISTANCE
See Also:
Constant Field Values

CORRELATION_P

public static final int CORRELATION_P
See Also:
Constant Field Values

CORRELATION_ENTROPY

public static final int CORRELATION_ENTROPY
See Also:
Constant Field Values

LINEAR_REGRESSION

public static final int LINEAR_REGRESSION
See Also:
Constant Field Values

COOKS_DISTANCE

public static final int COOKS_DISTANCE
See Also:
Constant Field Values
Constructor Detail

QualityMeasure

public QualityMeasure(int theMeasure,
                      int theTotalCoverage,
                      int theTotalTargetCoverage)

QualityMeasure

public QualityMeasure(int theMeasure,
                      int theTotalCoverage,
                      float theTotalSum,
                      float theTotalSSD,
                      float theTotalMedian,
                      float theTotalMedianAD)

QualityMeasure

public QualityMeasure(SearchParameters theSearchParameters,
                      DAG theDAG,
                      int theNrRecords)
Method Detail

getFirstEvaluationMeasure

public static int getFirstEvaluationMeasure(TargetType theTargetType)

getLastEvaluationMesure

public static int getLastEvaluationMesure(TargetType theTargetType)

calculate

public float calculate(int theCountHeadBody,
                       int theCoverage)
Contingency table:
B B
H n(HB) n(HB) n(H)
H n(HB) n(HB) n(H)
n(B) n(B) N


calculate

public static float calculate(int theMeasure,
                              int theTotalCoverage,
                              int theTotalTargetCoverage,
                              int theCountHeadBody,
                              int theCoverage)

calculateEntropy

public static float calculateEntropy(float bodySupport,
                                     float headBodySupport)

calculateConditionalEntropy

public static float calculateConditionalEntropy(float bodySupport,
                                                float bodyHeadSupport)
Calculates the ConditionalEntropy. By definition, 0*lg(0) is 0, such that any boundary cases return 0.

Parameters:
bodySupport -
bodyHeadSupport -
Returns:
the conditional entropy for given the two parameters.

calculateInformationGain

public static float calculateInformationGain(float totalSupport,
                                             float headSupport,
                                             float bodySupport,
                                             float headBodySupport)

calculate

public float calculate(int theCoverage,
                       float theSum,
                       float theSSD,
                       float theMedian,
                       float theMedianAD,
                       int[] theSubgroupCounts)

getMeasureMinimum

public static java.lang.String getMeasureMinimum(java.lang.String theEvaluationMeasure,
                                                 float theAverage)

getMeasureString

public static java.lang.String getMeasureString(int aEvaluationMeasure)

getMeasureCode

public static int getMeasureCode(java.lang.String theEvaluationMeasure)

calculate

public float calculate(Subgroup theSubgroup)

calculateEditDistance

public float calculateEditDistance(DAG theDAG)