DataScience
文章平均质量分 57
主要介绍 Numpy Matplotlib Scipy 等库的使用
jiang_huixin
这个作者很懒,什么都没留下…
展开
-
F1 得分(Macro-F1与Micro-F1)
对于二分类, F1 得分等于 Precision 与 Recall 的调和平均数, 公式如下:F1-Score=2∗Precsion∗RecallPrecision+RecallF1\text{-}Score=\frac{2*Precsion*Recall}{Precision+Recall}F1-Score=Precision+Recall2∗Precsion∗Recall对于多分类, 因为包含多个类别, F1 得分的计算包含 Macro-F1 和 Micro-F1 两种方式创建示例数据假原创 2021-02-08 12:41:53 · 1848 阅读 · 1 评论 -
Pandas set_index 用法
set_index 仅适用于 DataFrame, 作用是重新设置 DataFrame 的行索引创建示例数据, 行索引默认使用整数索引In [1]: import pandas as pdIn [2]: # 示例数据 ...: df = pd.DataFrame({"month": [2, 6, 12, 10], "year": [2008, 2012, 2012, 2019], "day": [29, 30, 31, 31]})In [3]: dfOut[3]: month原创 2021-01-23 13:28:34 · 11908 阅读 · 1 评论