Silke
Silke

Reputation: 177

R: rda() with CV

I've used the following code:

breast.rda = rda(Diagnosis~ ., data=breast, lambda = 0.2, crossval=T, fold = 10, gamma=0)

I can retrieve the error by running:

breast.rda[5]
## $error.rate
##       APER 
## 0.06151142 

But what does this error mean? How can I get only 0.06151142?

Upvotes: 0

Views: 194

Answers (1)

Sven Hohenstein
Sven Hohenstein

Reputation: 81683

Try

breast.rda[[5]]

to extract the fifth list element. In contrast, the command breast.rda[5] returns a list of length one.

Upvotes: 1

Related Questions