Description Usage Arguments Details Value Author(s) References See Also Examples
a classification function based on PCA following LDA. This function can be cooperated into crossValidation
by setting parameter method=fnPcaLda
1 2 3 |
data |
a data matrix, with samples saved in rows and features in columns. |
label |
a vector of response variables (i.e., group/concentration info), must be the same length as the number of samples. |
batch |
a vector of batch variables (i.e., batch/patient ID), must be given in case of |
nPC |
an integer, the number of principal components to be used in LDA. |
cv |
a character value, specifying the type of cross-validation. |
nPart |
an integer, the number of folds to be split for cross-validation. Equivalent to |
... |
parameters for |
build a classifier based on the given data and return an object including the PCA and LDA models in case of cv='none'
. Otherwise, a cross-validaiton is performed if cv='CV'
or cv='BV'
, corresponding to normal k-fold or batch-wise cross-validation, respectively. In the latter two cases, the function returns the results of the cross-validation (i.e., the output from crossValidation
.
For cv='none'
, a list of elements:
PCA |
PCA model |
LDA |
LDA model |
nPC |
nPC used for modeling |
For cv='CV'
or cv='BV'
, a list of elements:
Fold |
a list, each giving the sample indices of a fold |
True |
a vector of characters, groundtruth response variables, collected for each fold when it is used as testing data |
Pred |
a vector of characters, predicted results, collected for each fold when it is used as testing data |
Summ |
a list, the output of function |
Shuxia Guo, Thomas Bocklitz, Juergen Popp
S. Guo, T. Bocklitz, et al., Common mistakes in cross-validating classification models. Analytical methods 2017, 9 (30): 4410-4417.
crossValidation
, tunePcaLda
, lda
, prcomp
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.