public class AD
extends java.lang.Object
Constructor and Description |
---|
AD(double[][] vejemplos,
double[][] vdeseado)
Parameter constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
AlmacenaParametros(double[] pesos)
Stores the parameters of the LDA or QDA in the array given.
|
static int |
argmax(double[] x)
Returns the index of the maximum element of the array given.
|
java.lang.String |
AString(double[] s)
Returns a String representation of the array given.
|
java.lang.String |
AString(double[][] s)
Returns a String representation of the array of arrays given.
|
void |
computeParameter(boolean lineal)
Computes the different parameters for the algorithm where the DA will be used.
|
double[] |
distances(double[] x)
Computes the distances for the values given.
|
void |
RecuperaParametros(double[] pesos)
Recovers the parameters of the LDA or QDA stored in the array given.
|
public AD(double[][] vejemplos, double[][] vdeseado)
vejemplos
- examples considered.vdeseado
- examples desired.public void computeParameter(boolean lineal) throws ErrorDimension, ErrorSingular
lineal
- Lineal (True) or Quadratic (False) flag.ErrorDimension
- Dimension matrix error.ErrorSingular
- Sigular matrix error.public java.lang.String AString(double[] s)
s
- array given.public java.lang.String AString(double[][] s)
s
- array of arrays given.public double[] distances(double[] x) throws ErrorDimension, ErrorSingular
x
- values given to compute the distance.ErrorDimension
- Dimension matrix error.ErrorSingular
- Sigular matrix error.public void AlmacenaParametros(double[] pesos)
pesos
- array where the parameters will be stored.public void RecuperaParametros(double[] pesos)
AlmacenaParametros
pesos
- array given.public static int argmax(double[] x)
x
- array given.