Package weka.estimators
Class MultivariateGaussianEstimator
java.lang.Object
weka.estimators.MultivariateGaussianEstimator
- All Implemented Interfaces:
Serializable
,MultivariateEstimator
public class MultivariateGaussianEstimator
extends Object
implements MultivariateEstimator, Serializable
Implementation of maximum likelihood Multivariate Distribution Estimation using Normal
Distribution.
- Version:
- $Revision: 12898 $
- Author:
- Uday Kamath, PhD, George Mason University, Eibe Frank, University of Waikato
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final double
Log of twice the number pi: log(2*pi). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
estimate
(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.double
getRidge()
Get the value of Ridge.double
logDensity
(double[] valuePassed) Returns the log of the density value for the given vector.static void
Main method for testing this class.Returns the tip text for this propertyvoid
setRidge
(double newRidge) Set the value of Ridge.toString()
Returns string summarizing the estimator.
-
Field Details
-
Log2PI
public static final double Log2PILog of twice the number pi: log(2*pi).
-
-
Constructor Details
-
MultivariateGaussianEstimator
public MultivariateGaussianEstimator()
-
-
Method Details
-
toString
Returns string summarizing the estimator. -
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:
logDensity
in 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:
estimate
in 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
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
Main method for testing this class.- Parameters:
args
- command-line parameters
-