[R] e1071 question: what's the definition of performance in t une.* functions?

Tae-Hoon Chung thchung at tgen.org
Tue Jul 13 18:46:20 CEST 2004


Thank you Andy.

It seems like this can be the reason for the confusion.
I never thought that there can be this kind of catches for using tune.* 
functions.
For the record, I actually emailed to Dr. Friedrich Leisch the author 
of this library.
When I get some reply, I will post it also.

Regards,
TH

On Jul 12, 2004, at 6:40 PM, Liaw, Andy wrote:

> Looking at the body of tune(), it has:
>
> ...
>                 repeat.errors[reps] <- if (is.factor(true.y))
>                   1 - classAgreement(table(pred, true.y))
>                 else crossprod(pred - true.y)/length(pred)
> ...
>
> where classAgreement() is a function defined inside tune() that 
> computes the
> fraction of correctly predicted cases.  So it looks like tune() and 
> friends
> are returning error rates as fractions, not percentages.
>
> You're right that the fraction shouldn't be larger than 1.  Did you 
> make
> sure that tune() sees the data as classification, not regression 
> (i.e., did
> you make sure that the class labels given to tune.*() are factor)?
>
> HTH,
> Andy

Tae-Hoon Chung, Ph.D

Post-doctoral Research Fellow
Molecular Diagnostics and Target Validation Division
Translational Genomics Research Institute
1275 W Washington St, Tempe AZ 85281 USA
Phone: 602-343-8724




More information about the R-help mailing list