【发布时间】:2020-04-20 02:19:57
【问题描述】:
我希望我的 SVM 将给定数据分为 0、1、2 三类。最初我在第 1 类中得到 0 预测。所以我使用了网格搜索,即使在使用网格搜索之后,第 1 类的精度也为 0.0。可能有什么问题?我怎样才能使我的模型更精确?
网格搜索前:
precision recall f1-score support
0 0.75 0.44 0.55 41
1 0.00 0.00 0.00 37
2 0.50 0.98 0.66 55
accuracy 0.54 133
macro avg 0.42 0.47 0.40 133
weighted avg 0.44 0.54 0.44 133
网格搜索后:{'C': 100, 'gamma': 0.1, 'kernel': 'rbf'}
precision recall f1-score support
0 0.72 0.56 0.63 41
1 0.00 0.00 0.00 37
2 0.52 0.96 0.68 55
accuracy 0.57 133
macro avg 0.41 0.51 0.44 133
weighted avg 0.44 0.57 0.48 133
【问题讨论】:
标签: machine-learning