统计模型得分 [英] Statsmodels score
问题描述
我正在使用 statsmodels
运行逻辑回归,并试图找到我的回归分数.与 sklearn
不同,该文档并没有真正提供关于 score
方法的太多信息,它允许用户传递带有 y 值和回归系数的测试数据集,即 lr.score(test_data, target)
.我应该如何将参数传递给 statsmodels
的评分函数?文档:http://statsmodels.sourceforge.net/stable/generated/statsmodels.discrete.discrete_model.Logit.score.html#statsmodels.discrete.discrete_model.Logit.score
I am running a logistic regression using statsmodels
and am trying to find the score of my regression. The documentation doesn't really provide much information about the score
method unlike sklearn
which allows the user to pass a test dataset with the y value and the regression coefficients i.e. lr.score(test_data, target)
. What and how should I pass parameters to the statsmodels
's score function? Documentation: http://statsmodels.sourceforge.net/stable/generated/statsmodels.discrete.discrete_model.Logit.score.html#statsmodels.discrete.discrete_model.Logit.score
推荐答案
在统计学和计量经济学中 score
通常是指对数似然函数的导数.这是 statsmodels 中使用的定义.
In statistics and econometrics score
refers usually to the derivative of the log-likelihood function. That's the definition used in statsmodels.
使用二元因变量进行分类或回归的预测性能指标在统计模型中基本上被忽略了.一个开放的拉取请求在这里https://github.com/statsmodels/statsmodels/issues/1577
Prediction performance measures for classification or regression with binary dependent variables have largely been neglected in statsmodels. An open pull request is here https://github.com/statsmodels/statsmodels/issues/1577
statsmodels 确实有针对连续因变量的性能测量.
statsmodels does have performance measures for continuous dependent variables.
这篇关于统计模型得分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!