简体   繁体   English

Sklearn -predict_proba等效项

[英]Sklearn - predict_proba equivalents

So some of the models in Sci-kit learn such as Logistic Regression support the predict_proba method which I use heavily. 因此,Sci-kit学习的某些模型(例如Logistic回归)支持我大量使用的predict_proba方法。 Is there an other way for models such as Lasso to output a similar probability array, since they don't support predict_proba? 因为诸如Lasso之类的模型不支持predict_proba,还有其他方法可以输出类似的概率数组吗?

Also: I'm working with a three outcome dataset where the probabilities between the outcomes can be relatively even - any general suggestions for models/tunings to try to improve probability precision, that can handle 50+ feature columns? 另外:我正在使用三个结果数据集,其中结果之间的概率可能相对均匀-关于模型/调整以尝试提高概率精度的任何一般性建议,都可以处理50多个特征列? =) =)

Thanks! 谢谢!

Sklearn introduced Probability calibration exactly for this purpose. Sklearn正是为此目的引入了概率校准 Improving or adding support for classifiers without a natural probability-output. 在没有自然概率输出的情况下改善或增加对分类器的支持。

There is also a blog-post about this. 也有关于此的博客文章

Usage will be based on CalibratedClassifierCV . 用法将基于CalibratedClassifierCV

Of those two methods, sigmoid and isotonic , the former is quite popular as the underlying method behind libsvm's probability-output, which you can see in sklearn's wrapper SVC sigmoidisotonic这两种方法中,前一种作为libsvm的概率输出背后的基础方法非常受欢迎,您可以在sklearn的包装器SVC中看到它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM