fastnlp / fastNLP

fastNLP: A Modularized and Extensible NLP Framework. Currently still in incubation.
https://gitee.com/fastnlp/fastNLP
Apache License 2.0
3.06k stars 450 forks source link

[new]add_ConfusionMatrix #270

Closed ROGERDJQ closed 4 years ago

ROGERDJQ commented 4 years ago

增加了混淆矩阵,base on MetricBase class

Description:增加了分类的混淆矩阵,返回字典{"ConfusionMatrix":ConfusionMatrix}

Main reason: 分类混淆矩阵

Changes

Mention: 找人review你的PR

@修改过这个文件的人 @核心开发人员

codecov-io commented 4 years ago

Codecov Report

Merging #270 into dev0.5.0 will increase coverage by 3.39%. The diff coverage is 48.83%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev0.5.0     #270      +/-   ##
============================================
+ Coverage     73.43%   76.83%   +3.39%     
============================================
  Files            85       84       -1     
  Lines          7574    10174    +2600     
============================================
+ Hits           5562     7817    +2255     
- Misses         2012     2357     +345
Impacted Files Coverage Δ
fastNLP/core/metrics.py 76.81% <48.83%> (+14.7%) :arrow_up:
fastNLP/core/optimizer.py 46.23% <0%> (-43.77%) :arrow_down:
fastNLP/core/field.py 71.09% <0%> (-19.42%) :arrow_down:
fastNLP/modules/encoder/bert.py 68.63% <0%> (-12.17%) :arrow_down:
fastNLP/core/instance.py 89.47% <0%> (-3.86%) :arrow_down:
fastNLP/core/sampler.py 93.33% <0%> (-2.45%) :arrow_down:
fastNLP/core/trainer.py 78.92% <0%> (-2.32%) :arrow_down:
fastNLP/modules/encoder/transformer.py 94.59% <0%> (-2.29%) :arrow_down:
fastNLP/modules/decoder/crf.py 83.79% <0%> (-2.19%) :arrow_down:
fastNLP/core/tester.py 87.27% <0%> (-1.48%) :arrow_down:
... and 116 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 999a143...adec402. Read the comment docs.