|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.imirsel.m2k.modelling.Gaussian
A single Gaussian classifier with diagonal covariance
| Constructor Summary | |
Gaussian()
Creates a new instance of Gaussian |
|
Gaussian(Gaussian oldGaussian)
Copy constructor for a Gaussian |
|
Gaussian(int numClasses_)
Creates a new instance of Gaussian |
|
| Method Summary | |
int |
classify(double[] inputVector)
Calculates the mahalanobis distances of the inputVector from each
class and returns the integer class label of the closest class |
double |
mahalanobis(double[] vec,
double[] means,
double[] covars)
Calculates the mahalanobis distance of the input vector from
the means and covariances of the Gaussian model supplied |
void |
train(double[][] inputData,
int[] labels)
Trains the Gaussian model using diagonal covariance |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Gaussian()
Gaussian
public Gaussian(int numClasses_)
Gaussian
numClasses_ - Num of classes classifier is to be trained onpublic Gaussian(Gaussian oldGaussian)
Gaussian
oldGaussian - The Gaussian to copied| Method Detail |
public int classify(double[] inputVector)
mahalanobis distances of the inputVector from each
class and returns the integer class label of the closest class
inputVector - The vector to be classified
public void train(double[][] inputData,
int[] labels)
Gaussian model using diagonal covariance
inputData - The data to train the model onlabels - The class labels of the input data
public double mahalanobis(double[] vec,
double[] means,
double[] covars)
mahalanobis distance of the input vector from
the means and covariances of the Gaussian model supplied
vec - The vector to calculate the mahalanobis distance formeans - The means of the Gaussian model to test againstcovars - The covariances of the Gaussian model to test against
mahalanobis distance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||