本文整理匯總了Python中sklearn.metrics.SCORERS.update方法的典型用法代碼示例。如果您正苦於以下問題:Python SCORERS.update方法的具體用法?Python SCORERS.update怎麽用?Python SCORERS.update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sklearn.metrics.SCORERS
的用法示例。
在下文中一共展示了SCORERS.update方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: make_scorer
# 需要導入模塊: from sklearn.metrics import SCORERS [as 別名]
# 或者: from sklearn.metrics.SCORERS import update [as 別名]
from .version import __version__, VERSION
__all__ = ['Learner', 'load_examples', 'kappa', 'kendall_tau', 'spearman',
'pearson', 'f1_score_least_frequent', 'run_configuration',
'run_ablation', 'write_feature_file', 'convert_examples']
# Add our scorers to the sklearn dictionary here so that they will always be
# available if you import anything from skll
_scorers = {'f1_score_micro': make_scorer(f1_score, average='micro',
pos_label=None),
'f1_score_macro': make_scorer(f1_score, average='macro',
pos_label=None),
'f1_score_weighted': make_scorer(f1_score, average='weighted',
pos_label=None),
'f1_score_least_frequent': make_scorer(f1_score_least_frequent),
'pearson': make_scorer(pearson),
'spearman': make_scorer(spearman),
'kendall_tau': make_scorer(kendall_tau),
'unweighted_kappa': make_scorer(kappa),
'quadratic_weighted_kappa': make_scorer(kappa,
weights='quadratic'),
'linear_weighted_kappa': make_scorer(kappa, weights='linear'),
'qwk_off_by_one': make_scorer(kappa, weights='quadratic',
allow_off_by_one=True),
'lwk_off_by_one': make_scorer(kappa, weights='linear',
allow_off_by_one=True),
'uwk_off_by_one': make_scorer(kappa, allow_off_by_one=True)}
SCORERS.update(_scorers)