weka.classifiers.functions.pace
Class ChisqMixture

java.lang.Object
  extended byweka.classifiers.functions.pace.MixtureDistribution
      extended byweka.classifiers.functions.pace.ChisqMixture

public class ChisqMixture
extends MixtureDistribution

Class for manipulating chi-square mixture distributions.

REFERENCES

Wang, Y. (2000). "A new approach to fitting linear models in high dimensional spaces." PhD Thesis. Department of Computer Science, University of Waikato, New Zealand.

Wang, Y. and Witten, I. H. (2002). "Modeling for optimal probability prediction." Proceedings of ICML'2002. Sydney.

Version:
$Revision: 1.1 $
Author:
Yong Wang (yongwang@cs.waikato.ac.nz)

Field Summary
protected  int fittingIntervalLength
           
protected  double fittingIntervalThreshold
           
protected  int maxNumSupportPoints
           
protected  double separatingThreshold
           
protected  double supportThreshold
           
protected  double trimingThreshold
           
 
Fields inherited from class weka.classifiers.functions.pace.MixtureDistribution
mixingDistribution, NNMMethod, PMMethod
 
Constructor Summary
ChisqMixture()
          Contructs an empty ChisqMixture
 
Method Summary
 double f(double x)
          Computes the value of f(x) given the mixture.
 DoubleVector f(DoubleVector x)
          Computes the value of f(x) given the mixture, where x is a vector.
 PaceMatrix fittingIntervals(DoubleVector data)
          Contructs the set of fitting intervals for mixture estimation.
 double getSeparatingThreshold()
          Gets the separating threshold value.
 double getTrimingThreshold()
          Gets the triming thresholding value.
 double h(double AHat)
          Computes the value of h(x) given the mixture.
 DoubleVector h(DoubleVector AHat)
          Computes the value of h(x) given the mixture, where x is a vector.
 double hf(double AHat)
          Computes the value of h(x) / f(x) given the mixture.
static void main(java.lang.String[] args)
          Method to test this class
 DoubleVector pace2(DoubleVector x)
          Returns the pace2 estimate of a vector.
 DoubleVector pace4(DoubleVector x)
          Returns the pace4 estimate of a vector.
 double pace6(double x)
          Returns the pace6 estimate of a single value.
 DoubleVector pace6(DoubleVector x)
          Returns the pace6 estimate of a vector.
 PaceMatrix probabilityMatrix(DoubleVector s, PaceMatrix intervals)
          Contructs the probability matrix for mixture estimation, given a set of support points and a set of intervals.
 boolean separable(DoubleVector data, int i0, int i1, double x)
          Return true if a value can be considered for mixture estimatino separately from the data indexed between i0 and i1
 void setSeparatingThreshold(double t)
          Sets the separating threshold value
 void setTrimingThreshold(double t)
          Sets the triming thresholding value.
 DoubleVector supportPoints(DoubleVector data, int ne)
          Contructs the set of support points for mixture estimation.
 java.lang.String toString()
          Converts to a string
 void trim(DoubleVector x)
          Trims the small values of the estaimte
 
Methods inherited from class weka.classifiers.functions.pace.MixtureDistribution
empiricalProbability, fit, fit, fitForSingleCluster, getMixingDistribution, setMixingDistribution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

separatingThreshold

protected double separatingThreshold

trimingThreshold

protected double trimingThreshold

supportThreshold

protected double supportThreshold

maxNumSupportPoints

protected int maxNumSupportPoints

fittingIntervalLength

protected int fittingIntervalLength

fittingIntervalThreshold

protected double fittingIntervalThreshold
Constructor Detail

ChisqMixture

public ChisqMixture()
Contructs an empty ChisqMixture

Method Detail

getSeparatingThreshold

public double getSeparatingThreshold()
Gets the separating threshold value. This value is used by the method separatable


setSeparatingThreshold

public void setSeparatingThreshold(double t)
Sets the separating threshold value

Parameters:
t - the threshold value

getTrimingThreshold

public double getTrimingThreshold()
Gets the triming thresholding value. This value is usef by the method trim.


setTrimingThreshold

public void setTrimingThreshold(double t)
Sets the triming thresholding value.


separable

public boolean separable(DoubleVector data,
                         int i0,
                         int i1,
                         double x)
Return true if a value can be considered for mixture estimatino separately from the data indexed between i0 and i1

Specified by:
separable in class MixtureDistribution
Parameters:
data - the data supposedly generated from the mixture
i0 - the index of the first element in the group
i1 - the index of the last element in the group
x - the value

supportPoints

public DoubleVector supportPoints(DoubleVector data,
                                  int ne)
Contructs the set of support points for mixture estimation.

Specified by:
supportPoints in class MixtureDistribution
Parameters:
data - the data supposedly generated from the mixture
ne - the number of extra data that are suppposedly discarded earlier and not passed into here

fittingIntervals

public PaceMatrix fittingIntervals(DoubleVector data)
Contructs the set of fitting intervals for mixture estimation.

Specified by:
fittingIntervals in class MixtureDistribution
Parameters:
data - the data supposedly generated from the mixture

probabilityMatrix

public PaceMatrix probabilityMatrix(DoubleVector s,
                                    PaceMatrix intervals)
Contructs the probability matrix for mixture estimation, given a set of support points and a set of intervals.

Specified by:
probabilityMatrix in class MixtureDistribution
Parameters:
s - the set of support points
intervals - the intervals

pace6

public double pace6(double x)
Returns the pace6 estimate of a single value.

Parameters:
x - the value

pace6

public DoubleVector pace6(DoubleVector x)
Returns the pace6 estimate of a vector.

Parameters:
x - the vector

pace2

public DoubleVector pace2(DoubleVector x)
Returns the pace2 estimate of a vector.

Parameters:
x - the vector

pace4

public DoubleVector pace4(DoubleVector x)
Returns the pace4 estimate of a vector.

Parameters:
x - the vector

trim

public void trim(DoubleVector x)
Trims the small values of the estaimte

Parameters:
x - the estimate vector

hf

public double hf(double AHat)
Computes the value of h(x) / f(x) given the mixture. The implementation avoided overflow.


h

public double h(double AHat)
Computes the value of h(x) given the mixture.


h

public DoubleVector h(DoubleVector AHat)
Computes the value of h(x) given the mixture, where x is a vector.

Parameters:
AHat - the vector

f

public double f(double x)
Computes the value of f(x) given the mixture.

Parameters:
x - the value

f

public DoubleVector f(DoubleVector x)
Computes the value of f(x) given the mixture, where x is a vector.

Parameters:
x - the vector

toString

public java.lang.String toString()
Converts to a string

Overrides:
toString in class MixtureDistribution

main

public static void main(java.lang.String[] args)
Method to test this class