public class RDA extends QDA
LDA,
QDA,
Serialized Form| Constructor and Description |
|---|
RDA(double[] priori,
double[][] mu,
double[][] eigen,
smile.math.matrix.Matrix[] scaling)
Constructor.
|
RDA(double[] priori,
double[][] mu,
double[][] eigen,
smile.math.matrix.Matrix[] scaling,
smile.util.IntSet labels)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static RDA |
fit(double[][] x,
int[] y,
double alpha)
Learn regularized discriminant analysis.
|
static RDA |
fit(double[][] x,
int[] y,
double alpha,
double[] priori,
double tol)
Learn regularized discriminant analysis.
|
static RDA |
fit(double[][] x,
int[] y,
java.util.Properties prop)
Learns regularized discriminant analysis.
|
static RDA |
fit(smile.data.formula.Formula formula,
smile.data.DataFrame data)
Learns regularized discriminant analysis.
|
static RDA |
fit(smile.data.formula.Formula formula,
smile.data.DataFrame data,
java.util.Properties prop)
Learns regularized discriminant analysis.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpredictapplyAsDouble, applyAsInt, predict, scorepublic RDA(double[] priori,
double[][] mu,
double[][] eigen,
smile.math.matrix.Matrix[] scaling)
priori - a priori probabilities of each class.mu - the mean vectors of each class.eigen - the eigen values of each variance matrix.scaling - the eigen vectors of each covariance matrix.public RDA(double[] priori,
double[][] mu,
double[][] eigen,
smile.math.matrix.Matrix[] scaling,
smile.util.IntSet labels)
priori - a priori probabilities of each class.mu - the mean vectors of each class.eigen - the eigen values of each variance matrix.scaling - the eigen vectors of each covariance matrix.labels - class labelspublic static RDA fit(smile.data.formula.Formula formula, smile.data.DataFrame data)
formula - a symbolic description of the model to be fitted.data - the data frame of the explanatory and response variables.public static RDA fit(smile.data.formula.Formula formula, smile.data.DataFrame data, java.util.Properties prop)
formula - a symbolic description of the model to be fitted.data - the data frame of the explanatory and response variables.public static RDA fit(double[][] x, int[] y, java.util.Properties prop)
x - training samples.y - training labels.public static RDA fit(double[][] x, int[] y, double alpha)
x - training samples.y - training labels in [0, k), where k is the number of classes.alpha - regularization factor in [0, 1] allows a continuum of models
between LDA and QDA.public static RDA fit(double[][] x, int[] y, double alpha, double[] priori, double tol)
x - training samples.y - training labels in [0, k), where k is the number of classes.alpha - regularization factor in [0, 1] allows a continuum of models
between LDA and QDA.priori - the priori probability of each class. If null, it will be
estimated from the training data.tol - a tolerance to decide if a covariance matrix is singular; it
will reject variables whose variance is less than tol2.