test_ZVD: Classify test data using nearest centroid classification and...

View source: R/test_ZVD.R

test_ZVDR Documentation

Classify test data using nearest centroid classification and discriminant vectors learned from the training set.

Description

This function is used in SZVDcv and is only meant for internal use at this stage. Will potentially be released in future versions.

Usage

test_ZVD(w, test, classMeans, mus, scaling, ztol)

Arguments

w

Matrix with columns equal to discriminant vectors.

test

matrix containing test set.

classMeans

Means of each class in the training set, (used for computing centroids for classification).

mus

means/standard devs of the training set, (used for centering/normalizing the test data appropriately).

scaling

Logical indicating whether scaling should be done. on the test set.

ztol

Threshold for setting values in DVs to zero.

Details

This function is used by other functions and should only be called explicitly for debugging purposes. Potential release in the future. This function should potentially be made internal for the release.

Value

test_ZVD returns an object of class "test_ZVD" including a list with the following named components

stats

list containing number of misclassified observations, l0 and l1 norms of discriminants.

pred_labs

predicted class labels according to nearest centroid and the discriminants.

See Also

Used by: SZVDcv.


accSDA documentation built on Sept. 5, 2022, 5:05 p.m.