This page

scikits.learn.metrics.fbeta_score

scikits.learn.metrics.fbeta_score(y_true, y_pred, beta, pos_label=1)

Compute fbeta score

The F_beta score can be interpreted as a weighted average of the precision and recall, where an F_beta score reaches its best value at 1 and worst score at 0.

F_1 weights recall beta as much as precision.

See: http://en.wikipedia.org/wiki/F1_score

Parameters :

y_true : array, shape = [n_samples]

true targets

y_pred : array, shape = [n_samples]

predicted targets

beta: float :

pos_label : int

in the binary classification case, give the label of the positive class (default is 1)

Returns :

fbeta_score : float

fbeta_score of the positive class in binary classification or weighted avergage of the fbeta_score of each class for the multiclass task