public class DiscriminantAnalysis
extends java.lang.Object
Constructor and Description |
---|
DiscriminantAnalysis(double[][] d,
double[] g)
Calculates a linear discriminant analysis (LDA) with all necessary
|
Modifier and Type | Method and Description |
---|---|
double[] |
getDiscriminantFunctionValues(double[] values)
Calculates the discriminant function values for the different groups
|
double[] |
getFisherWeights()
Returns the weight for the linear fisher's discrimination functions
|
double[] |
getMahalanobisDistance(double[] values)
Calculates the discriminant function values for the different groups based on Mahalanobis distance
|
static double |
getMean(double[] values)
Returns the mean of the given values.
|
double[] |
getProbabilityEstimates(double[] values)
Calculates the probability for the membership in the different groups
|
double |
predict(double[] values)
Predict the membership of an object to one of the different groups.
|
double |
predictM(double[] values)
Predict the membership of an object to one of the different groups based on Mahalanobis distance
|
public DiscriminantAnalysis(double[][] d, double[] g)
d
- The data as double array. The array must have the same size as
the group arrayg
- The membership in the different groupspublic double[] getDiscriminantFunctionValues(double[] values)
values
- fill this array with the valuespublic double[] getMahalanobisDistance(double[] values)
values
- fill this array with the valuespublic double predictM(double[] values)
values
- fill this array with the valuespublic double[] getProbabilityEstimates(double[] values)
values
- fill this array with the valuespublic double[] getFisherWeights()
public double predict(double[] values)
values
- fill this array with the valuespublic static double getMean(double[] values)
values
- The values.RH, 2017