Description Usage Arguments Details Value References Examples
Returns a (m x 1) vector of predicted group membership (either 1 or 2) for each data point in X. Uses Data and Cat to train the classifier.
1 2 |
X |
(m x p) Matrix of unlabelled data with numeric features to be classified. Cannot have missing values. |
Data |
(n x p) Matrix of training data with numeric features. Cannot have missing values. |
Cat |
(n x 1) Vector of class membership corresponding to Data. Values must be either 1 or 2. |
Sigma |
Scalar Gaussian kernel parameter. Default set to NULL and is automatically generated if user-specified value not provided. Must be > 0. User-specified parameters must satisfy hierarchical ordering. |
Gamma |
Scalar ridge parameter used in kernel optimal scoring. Default set to NULL and is automatically generated if user-specified value not provided. Must be > 0. User-specified parameters must satisfy hierarchical ordering. |
Lambda |
Scalar sparsity parameter on weight vector. Default set to NULL and is automatically generated by the function if user-specified value not provided. Must be >= 0. When Lambda = 0, SparseKOS defaults to kernel optimal scoring of [Lapanowski and Gaynanova, preprint] without sparse feature selection. User-specified parameters must satisfy hierarchical ordering. |
Epsilon |
Numerical stability constant with default value 1e-05. Must be > 0 and is typically chosen to be small. |
Function which handles classification. Generates feature weight vector and discriminant coefficients vector in sparse kernel optimal scoring. If a matrix X is provided, the function classifies each data point using the generated feature weight vector and discriminant vector. Will use user-supplied parameters Sigma, Gamma, and Lambda if any are given. If any are missing, the function will run SelectParams to generate the other parameters. User-specified values must satisfy hierarchical ordering.
A list of
Predictions |
(m x 1) Vector of predicted class labels for the data points in Data. Only included in non-null value of X is provided. |
Weights |
(p x 1) Vector of feature weights. |
Dvec |
(n x 1) Discrimiant coefficients vector. |
Lapanowski, Alexander F., and Gaynanova, Irina. “Sparse feature selection in kernel discriminant analysis via optimal scoring”, preprint.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.