edu.udo.cs.yale.operator.learner.igss.utility
Class AbstractUtility

java.lang.Object
  extended by edu.udo.cs.yale.operator.learner.igss.utility.AbstractUtility
All Implemented Interfaces:
Utility
Direct Known Subclasses:
Binomial, InstanceAveraging, Linear, Squared

public abstract class AbstractUtility
extends java.lang.Object
implements Utility

Abstract superclass for all utility functions.

Version:
$Id: AbstractUtility.java,v 1.1 2006/10/02 16:07:49 ingomierswa Exp $
Author:
Dirk Dach

Field Summary
protected  int large
          The number of covered examples before normal approximation is used.
protected  double[] priors
          The prior probability of the two classes of the label.
 
Fields inherited from interface edu.udo.cs.yale.operator.learner.igss.utility.Utility
FIRST_TYPE_INDEX, LAST_TYPE_INDEX, TYPE_ACCURACY, TYPE_BINOMIAL, TYPE_LINEAR, TYPE_SQUARED, TYPE_WRACC, UTILITY_TYPES
 
Constructor Summary
AbstractUtility(double[] priors, int large)
          Constructor for all utilities.
 
Method Summary
 double calculateM(double delta, double epsilon)
          Calculates the M-value needed for the GSS algorithm.
abstract  double conf(double totalWeight, double delta)
          Calculates the normal approximation of the confidence intervall.
abstract  double conf(double totalWeight, double totalPositiveWeight, Hypothesis hypo, double delta)
          Calculates the normal approximation of the confidence intervall for a specific hypothesis.
 double confidenceIntervall(double totalWeight, double delta)
          Calculates the the unspecific confidence intervall.
 double confidenceIntervall(double totalWeight, double totalPositiveWeight, Hypothesis hypo, double delta)
          Calculates the the confidence intervall for a specific hypothesis.
abstract  double confSmallM(double totalWeight, double delta)
          Calculates the confidence intervall for small numbers of examples.
 double inverseNormal(double p)
          Calculates the inverse of the normal distribution, e.g.inverseNormal(0.95)==1.64.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.udo.cs.yale.operator.learner.igss.utility.Utility
getUpperBound, utility
 

Field Detail

priors

protected double[] priors
The prior probability of the two classes of the label.


large

protected int large
The number of covered examples before normal approximation is used.

Constructor Detail

AbstractUtility

public AbstractUtility(double[] priors,
                       int large)
Constructor for all utilities.

Method Detail

calculateM

public double calculateM(double delta,
                         double epsilon)
Calculates the M-value needed for the GSS algorithm.

Specified by:
calculateM in interface Utility


confidenceIntervall

public double confidenceIntervall(double totalWeight,
                                  double delta)
Calculates the the unspecific confidence intervall. Uses Chernoff bounds if the number of random experiments is too small and normal approximatione otherwise. Considers the number of examples as the number of random experiments. problematic for g*(p-p0)) hypothesis, that only cover a small amount of examples. No normal approximation should be used in this case.

Specified by:
confidenceIntervall in interface Utility


confidenceIntervall

public double confidenceIntervall(double totalWeight,
                                  double totalPositiveWeight,
                                  Hypothesis hypo,
                                  double delta)
Calculates the the confidence intervall for a specific hypothesis. Uses Chernoff bounds if the number of random experiments is too small and normal approximation otherwise. This method is adapted for g*(p-p0) utility types. Every example for that the rule is applicable is one random experiment. Should be overwritten by subclasses if they make a different random experiment.

Specified by:
confidenceIntervall in interface Utility


confSmallM

public abstract double confSmallM(double totalWeight,
                                  double delta)
Calculates the confidence intervall for small numbers of examples.


conf

public abstract double conf(double totalWeight,
                            double delta)
Calculates the normal approximation of the confidence intervall.


conf

public abstract double conf(double totalWeight,
                            double totalPositiveWeight,
                            Hypothesis hypo,
                            double delta)
Calculates the normal approximation of the confidence intervall for a specific hypothesis.


inverseNormal

public double inverseNormal(double p)
Calculates the inverse of the normal distribution, e.g.inverseNormal(0.95)==1.64.



Copyright © 2001-2006