2012/10/6 Satrajit Ghosh <[email protected]> > do you have an equal number of samples for all classes? the default metric is > a weighted average that takes into account imbalance across samples. see: > > https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/metrics/metrics.py#L583
To be precise, what you have computed is the "macro-average" (over classes), while scikit-learn computes a kind of weighted average by default (not sure whether this has a name in the literature). The usual way of averaging in the literature is the micro-average (over instances), which you can obtain by passing average="micro" to the metric functions. -- Lars Buitinck Scientific programmer, ILPS University of Amsterdam ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
