koplsDummy {kopls} | R Documentation |
Converts integer vector to binary class matrix ('dummy' matrix).
koplsDummy(class)
class |
Integer vector containing values denoting class belonging. |
numClasses |
Number of classes. If NA, the number of unique entries in class will be used instead. |
A matrix with rows corresponding to observations and columns to classes. Each element in matrix is either one (observation belongs to class) or zero (observation does not belong to class).
Max Bylesjo and Mattias Rantalainen
Rantalainen M, Bylesjo M, Cloarec O, Nicholson JK, Holmes E and Trygg J. Kernel-based orthogonal projections to latent structures (K-OPLS), J Chemometrics 2007; 21:376-385. doi:10.1002/cem.1071.