sklearn是否支持成本矩阵? [英] Does sklearn support a cost matrix?

查看:148
本文介绍了sklearn是否支持成本矩阵?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用成本矩阵针对不同的错误在sklearn中训练分类器?例如,在2类问题中,成本矩阵将是2 x 2的正方形矩阵。例如,A_ij =将i分类为j的成本。

Is it possible to train classifiers in sklearn with a cost matrix with different costs for different mistakes? For example in a 2 class problem, the cost matrix would be a 2 by 2 square matrix. For example A_ij = cost of classifying i as j.

我正在使用的主要分类器是随机森林。

The main classifier I am using is a Random Forest.

谢谢。

推荐答案

在我们描述的所有分类器中,scikit-learn不支持您描述的成本敏感框架。有。

The cost-sensitive framework you describe is not supported in scikit-learn, in any of the classifiers we have.

这篇关于sklearn是否支持成本矩阵?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆