I was checking the blame for the file, and I found that the current file in
github has an explanation for this:
average : string, [None (default), 'micro', 'macro', 'weighted']
If ``None``, the scores for each class are returned. Otherwise,
unless ``pos_label`` is given in binary classification, this
determines the type of averaging performed on the data...
So as it says, giving 'pos_label' explicitly solves the issue. I will now
check the code more thoroughly to understand why the default value for
pos_label (which is 1) cannot be used while calculating averages in a
binary classification.
Thanks for your attention!
Pavel S.
Université Lumière Lyon 2
ERIC Labo
On Tue, May 14, 2013 at 12:41 AM, Pavel Soriano <sorianopa...@gmail.com>wrote:
> I am currently assessing the performance of a logit classifier, and I
> wonder why is the “average” option, for the F-score metric, is not taken
> into account when using a binary classifier. I am talking about line 1091
> of metrics.py (sklearn.metrics):
>
> elif n_labels == 2 and pos_label is not None:
>
>
> after entering this “if”, the F-score of the positive label is returned,
> without taking into account the macro (or micro) averaging.
>
> In Manning's Introduction to Information Retrieval (pg. 260) they show
> it is possible to obtain it.(In fact I modified this line, in
> metrics.py, and the value was indeed returned, after a macro averaging.)
>
> I guess I am missing something, just want to be sure.
>
> Pavel S.
>
>
------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general