Thanks Max and Dennis. Based on the syntax change I got the result for the
PCA part also.
training2 <- training[,grepl("^IL",names(training))]
preProc <- preProcess(training2,method="pca",thresh=0.8)
test2 <- testing[,grepl("^IL",names(testing))]
trainpca <- predict(preProc, training2)
testp
Oh. I understand now. There is nothing wrong with the logic. It is the
syntax.
> library(AppliedPredictiveModeling)
*Warning message:*
*package ‘AppliedPredictiveModeling’ was built under R version 3.1.1 *
> set.seed(3433)
> data(AlzheimerDisease)
> adData = data.frame(diagnosis,predictors)
You have not shown all of your code and it is difficult to diagnose the
issue.
I assume that you are using the data from:
library(AppliedPredictiveModeling)
data(AlzheimerDisease)
If so, there is example code to analyze these data in that package. See
?scriptLocation.
We have no idea how
Hi Dennis,
Why is there that warning ? I think my syntax is
right. Isn't it not? So the warning can be ignored ?
Thanks,
Mohan
On Wed, Sep 17, 2014 at 9:48 PM, Dennis Murphy wrote:
> No reproducible example (i.e., no data) supplied, but the following
> should work in gener
I answered this question which was part of the online course correctly by
executing some commands and guessing.
But I didn't get the gist of this approach though my R code works.
I have a training and test dataset.
> nrow(training)
[1] 251
> nrow(testing)
[1] 82
> head(training1)
diagnos
5 matches
Mail list logo