Skip to content

confusion() -- generic function in package mda -- generally useful?

2 messages · Martin Maechler, Kurt Hornik

#
For a private package ("soon" to be on CRAN),
I started looking at and thinking about the function confusion() from the
mda package and wondered if it wouldn't make sense to provide the generic
function in base R and also think about making the default for the `true'
argument equal to  fitted(object).

One could write methods for confusion() for almost all classifiers 
which would be a nice universal approach.
Also, the value (a confusion matrix contingency table with some "useful"
attributes) could be made a bit more explicit.

Good or not so good idea?  alternatives?

Martin Maechler <maechler@stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO D10	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
6 days later
#
I think it would be nice to unify some of the existing code for
classification, e.g. the types in the predict methods.

Re confusion(), what would this do exactly?  The stuff in mda does too
much as exemplified by

\method{confusion}{default}(object, true, \dots)
\method{confusion}{fda}(object, data, \dots)

so the default and fda methods have surprising arguments ...?  (I think
you only want the versions for fitted model objects.)

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._