MultinomialResults.resid_misclassified()

statsmodels.discrete.discrete_model.MultinomialResults.resid_misclassified

MultinomialResults.resid_misclassified() [source]

Residuals indicating which observations are misclassified.

Notes

The residuals for the multinomial model are defined as

argmax(y_i) \neq argmax(p_i)

where argmax(y_i) is the index of the category for the endogenous variable and argmax(p_i) is the index of the predicted probabilities for each category. That is, the residual is a binary indicator that is 0 if the category with the highest predicted probability is the same as that of the observed variable and 1 otherwise.

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.discrete.discrete_model.MultinomialResults.resid_misclassified.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部