Package weka.classifiers.functions.pace
Class ChisqMixture
- java.lang.Object
-
- weka.classifiers.functions.pace.MixtureDistribution
-
- weka.classifiers.functions.pace.ChisqMixture
-
- All Implemented Interfaces:
RevisionHandler,TechnicalInformationHandler
public class ChisqMixture extends MixtureDistribution
Class for manipulating chi-square mixture distributions. For more information see: Wang, Y (2000). A new approach to fitting linear models in high dimensional spaces. Hamilton, New Zealand.
Wang, Y., Witten, I. H.: Modeling for optimal probability prediction. In: Proceedings of the Nineteenth International Conference in Machine Learning, Sydney, Australia, 650-657, 2002. BibTeX:@phdthesis{Wang2000, address = {Hamilton, New Zealand}, author = {Wang, Y}, school = {Department of Computer Science, University of Waikato}, title = {A new approach to fitting linear models in high dimensional spaces}, year = {2000} } @inproceedings{Wang2002, address = {Sydney, Australia}, author = {Wang, Y. and Witten, I. H.}, booktitle = {Proceedings of the Nineteenth International Conference in Machine Learning}, pages = {650-657}, title = {Modeling for optimal probability prediction}, year = {2002} }- Version:
- $Revision: 1.5 $
- Author:
- Yong Wang (yongwang@cs.waikato.ac.nz)
-
-
Field Summary
-
Fields inherited from class weka.classifiers.functions.pace.MixtureDistribution
NNMMethod, PMMethod
-
-
Constructor Summary
Constructors Constructor Description ChisqMixture()Contructs an empty ChisqMixture
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doublef(double x)Computes the value of f(x) given the mixture.DoubleVectorf(DoubleVector x)Computes the value of f(x) given the mixture, where x is a vector.PaceMatrixfittingIntervals(DoubleVector data)Contructs the set of fitting intervals for mixture estimation.java.lang.StringgetRevision()Returns the revision string.doublegetSeparatingThreshold()Gets the separating threshold value.doublegetTrimingThreshold()Gets the triming thresholding value.doubleh(double AHat)Computes the value of h(x) given the mixture.DoubleVectorh(DoubleVector AHat)Computes the value of h(x) given the mixture, where x is a vector.doublehf(double AHat)Computes the value of h(x) / f(x) given the mixture.static voidmain(java.lang.String[] args)Method to test this classDoubleVectorpace2(DoubleVector x)Returns the pace2 estimate of a vector.DoubleVectorpace4(DoubleVector x)Returns the pace4 estimate of a vector.doublepace6(double x)Returns the pace6 estimate of a single value.DoubleVectorpace6(DoubleVector x)Returns the pace6 estimate of a vector.PaceMatrixprobabilityMatrix(DoubleVector s, PaceMatrix intervals)Contructs the probability matrix for mixture estimation, given a set of support points and a set of intervals.booleanseparable(DoubleVector data, int i0, int i1, double x)Return true if a value can be considered for mixture estimation separately from the data indexed between i0 and i1voidsetSeparatingThreshold(double t)Sets the separating threshold valuevoidsetTrimingThreshold(double t)Sets the triming thresholding value.DoubleVectorsupportPoints(DoubleVector data, int ne)Contructs the set of support points for mixture estimation.java.lang.StringtoString()Converts to a stringvoidtrim(DoubleVector x)Trims the small values of the estaimte-
Methods inherited from class weka.classifiers.functions.pace.MixtureDistribution
empiricalProbability, fit, fit, fitForSingleCluster, getMixingDistribution, getTechnicalInformation, setMixingDistribution
-
-
-
-
Method Detail
-
getSeparatingThreshold
public double getSeparatingThreshold()
Gets the separating threshold value. This value is used by the method separatable- Returns:
- the separating threshold
-
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.- Returns:
- the triming threshold
-
setTrimingThreshold
public void setTrimingThreshold(double t)
Sets the triming thresholding value.- Parameters:
t- the triming threshold
-
separable
public boolean separable(DoubleVector data, int i0, int i1, double x)
Return true if a value can be considered for mixture estimation separately from the data indexed between i0 and i1- Specified by:
separablein classMixtureDistribution- Parameters:
data- the data supposedly generated from the mixturei0- the index of the first element in the groupi1- the index of the last element in the groupx- the value- Returns:
- true if the value can be considered
-
supportPoints
public DoubleVector supportPoints(DoubleVector data, int ne)
Contructs the set of support points for mixture estimation.- Specified by:
supportPointsin classMixtureDistribution- Parameters:
data- the data supposedly generated from the mixturene- the number of extra data that are suppposedly discarded earlier and not passed into here- Returns:
- the set of support points
-
fittingIntervals
public PaceMatrix fittingIntervals(DoubleVector data)
Contructs the set of fitting intervals for mixture estimation.- Specified by:
fittingIntervalsin classMixtureDistribution- Parameters:
data- the data supposedly generated from the mixture- Returns:
- the set of fitting intervals
-
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:
probabilityMatrixin classMixtureDistribution- Parameters:
s- the set of support pointsintervals- the intervals- Returns:
- the probability matrix
-
pace6
public double pace6(double x)
Returns the pace6 estimate of a single value.- Parameters:
x- the value- Returns:
- the pace6 estimate
-
pace6
public DoubleVector pace6(DoubleVector x)
Returns the pace6 estimate of a vector.- Parameters:
x- the vector- Returns:
- the pace6 estimate
-
pace2
public DoubleVector pace2(DoubleVector x)
Returns the pace2 estimate of a vector.- Parameters:
x- the vector- Returns:
- the pace2 estimate
-
pace4
public DoubleVector pace4(DoubleVector x)
Returns the pace4 estimate of a vector.- Parameters:
x- the vector- Returns:
- the pace4 estimate
-
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.- Parameters:
AHat- the value- Returns:
- the value of h(x) / f(x)
-
h
public double h(double AHat)
Computes the value of h(x) given the mixture.- Parameters:
AHat- the value- Returns:
- the value of h(x)
-
h
public DoubleVector h(DoubleVector AHat)
Computes the value of h(x) given the mixture, where x is a vector.- Parameters:
AHat- the vector- Returns:
- the value of h(x)
-
f
public double f(double x)
Computes the value of f(x) given the mixture.- Parameters:
x- the value- Returns:
- the value of f(x)
-
f
public DoubleVector f(DoubleVector x)
Computes the value of f(x) given the mixture, where x is a vector.- Parameters:
x- the vector- Returns:
- the value of f(x)
-
toString
public java.lang.String toString()
Converts to a string- Overrides:
toStringin classMixtureDistribution- Returns:
- a string representation
-
getRevision
public java.lang.String getRevision()
Returns the revision string.- Returns:
- the revision
-
main
public static void main(java.lang.String[] args)
Method to test this class- Parameters:
args- the commandline arguments
-
-