Sklearn笔记:度量和评分

——————————————————————————————————————————————————————
原文:3.3. Metrics and scoring: quantifying the quality of predictions — scikit-learn 0.22.2 documentation

主要函数概览

对应的数学公式(来源于:周志华《机器学习》)

  • 准确率

\[准确率: {\rm{acc}}uracy = \sum\limits_{i = 1}^n {I({y_{true}} = {y_{pred}})} \]

  • Brier分数

概率校准与Brier分数 - stardsd - 博客园

\[Brie{r_{score}} = \frac{1}{N}\sum\limits_{t = 1}^N {({y_{true,t}} - {y_{pred,t}})} \]


  • 查准率、召回率、F指数

\[precision:P = \frac{{TP}}{{TP + FP}}{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {P_{{\rm{macro}}}} = \frac{1}{n}\sum\limits_{i = 1}^n {{P_i}} \]

\[recall:R = \frac{{TP}}{{TP + FN}}{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {R_{macro}} = \frac{1}{n}\sum\limits_{i = 1}^n {{R_i}} \]

\[{F_\beta }{\rm{ = }}\frac{{(1 + {\beta ^2})*P*R}}{{({\beta ^2}*P + R)}}{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {F_{\beta {\rm{ - macro}}}} = \frac{{(1 + {\beta ^2})*{P_{macro}}*{R_{macro}}}}{{({\beta ^2}*{P_{macro}} + {R_{macro}})}} \]

  • ROC
  • 聚类指标
  • 其它

聚类评价指标 - 知乎

posted @ 2020-04-28 18:12  LgRun  阅读(193)  评论(0编辑  收藏  举报