Re: [R] errorest of library iprde: specifiying parameters for regularized DA

From: Uwe Ligges <ligges_at_statistik.tu-dortmund.de>
Date: Fri, 27 May 2011 15:10:08 +0200

On 27.05.2011 11:55, Felix Bach wrote:
> Hi dear R users,
>
> I am using the function errorest from the libbrary ipred to estimate the 10 fold and bootstrap classification error rate using regularized discriminat function analysis (functiopn rda from library klaR). Is it possible to set my own values for gamma and lambda?
> Any help will be highly appreciated!
>
> Best wishes,
>
> Felix
>
> library(klaR)
> library(ipred)
>
> # force predict to return class labels only
> mypredict.lda<- function(object, newdata) predict(object, newdata = newdata)$class
>
> # 10-fold cv of RDA for Iris data
> errorest(Species ~ ., data=iris, model=rda, estimator = "cv", predict= mypredict.lda)

Yes, via ... as in:

errorest(Species ~ ., data=iris, model=rda, estimator = "cv",   predict= mypredict.lda, gamma=0, lambda=0)

Uwe Ligges

> --
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 27 May 2011 - 13:12:30 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 27 May 2011 - 13:40:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive