I need to perform kernel PCA on the colon-‐cancer dataset and then I need to plot number of principal components vs classification accuracy with PCA data.
For the first part I am using kernlab in R as follows (let number of features be 2 and then I will vary it from say 2-100):
kpc <- kpca(~.,data=data[,-1],kernel="rbfdot",kpar=list(sigma=0.2),features=2)
I am having tough time to understand how to use this PCA data for classification (I can use any classifier, e.g. SVM). Basically my question is how to use kernel PCA for classification?
Data look like this:
Uncleaned original data look like this: