Introduction: Statsmodels is not that famous a library as scikit-learn (sklearn) is. But often a time for statistical analysis, you will want to use statsmodel packages. Also, it is one of the closest resemblance between R packages and python packages. I have been using it on and off for the last year and I find it difficult to remember all the errors, common mistakes, and their necessary solutions. This post is meant to serve as a small directory of statsmodels related errors and mistakes and their possible solutions. model does not have attribute summary: Let's say you are training some model with the following sort of code: model = sm.Logit(Y,X) model.fit() print(model.summary()) And then this error arises, saying that model does not have an attribute summary. Also if you try model.predict(), you will get the error somewhat like 'model do not have the predict method'. The reason being that, once in statsmodels you fit the model, the trained model with all th
I write about machine learning models, python programming, web scraping, statistical tests and other coding or data science related things I find interesting. Read, learn and grow with me!