Package weka.estimators
Class MultivariateGaussianEstimator
- java.lang.Object
-
- weka.estimators.MultivariateGaussianEstimator
-
- All Implemented Interfaces:
java.io.Serializable,MultivariateEstimator
public class MultivariateGaussianEstimator extends java.lang.Object implements MultivariateEstimator, java.io.Serializable
Implementation of maximum likelihood Multivariate Distribution Estimation using Normal Distribution.- Version:
- $Revision: 12904 $
- Author:
- Uday Kamath, PhD, George Mason University, Eibe Frank, University of Waikato
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static doubleLog2PILog of twice the number pi: log(2*pi).
-
Constructor Summary
Constructors Constructor Description MultivariateGaussianEstimator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidestimate(double[][] observations, double[] weights)Generates the estimator based on the given observations and weight vector.double[][]estimatePooled(double[][][] observations, double[][] weights)Generates pooled estimator for linear discriminant analysis based on the given groups of observations and weight vectors.double[]getMean()Returns the mean vector.doublegetRidge()Get the value of Ridge.doublelogDensity(double[] valuePassed)Returns the log of the density value for the given vector.static voidmain(java.lang.String[] args)Main method for testing this class.java.lang.StringridgeTipText()Returns the tip text for this propertyvoidsetRidge(double newRidge)Set the value of Ridge.java.lang.StringtoString()Returns string summarizing the estimator.
-
-
-
Method Detail
-
toString
public java.lang.String toString()
Returns string summarizing the estimator.- Overrides:
toStringin classjava.lang.Object
-
getMean
public double[] getMean()
Returns the mean vector.
-
logDensity
public double logDensity(double[] valuePassed)
Returns the log of the density value for the given vector.- Specified by:
logDensityin interfaceMultivariateEstimator- Parameters:
valuePassed- input vector- Returns:
- log density based on given distribution
-
estimate
public void estimate(double[][] observations, double[] weights)Generates the estimator based on the given observations and weight vector. Equal weights are assumed if the weight vector is null.- Specified by:
estimatein interfaceMultivariateEstimator- Parameters:
observations- the value to addweights- the weight of the value
-
estimatePooled
public double[][] estimatePooled(double[][][] observations, double[][] weights)Generates pooled estimator for linear discriminant analysis based on the given groups of observations and weight vectors. The pooled covariance matrix is the weighted mean of the per-group covariance matrices. The pooled mean vector is the mean vector for all observations.- Returns:
- the per group mean vectors
-
ridgeTipText
public java.lang.String ridgeTipText()
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getRidge
public double getRidge()
Get the value of Ridge.- Returns:
- Value of Ridge.
-
setRidge
public void setRidge(double newRidge)
Set the value of Ridge.- Parameters:
newRidge- Value to assign to Ridge.
-
main
public static void main(java.lang.String[] args)
Main method for testing this class.- Parameters:
args- command-line parameters
-
-