statsmodels imports, replace sm
See original GitHub issue(I’m just following up a link and briefly browsed the source)
bambi/priors.py imports statsmodels.api
This is not recommended for library use because it imports all of statsmodels and large parts of scipy.
Most of the time it is more efficient and faster in loading to just import the relevant submodules or objects, e.g. just GLM class and families module
e.g.
from statsmodels.genmod.generalized_linear_model import GLM
from statsmodels.genmod import families
https://gist.github.com/josef-pkt/61039ab6dc7fb8b502caf5f2050111c0
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Import Paths and Structure
Importing statsmodels.api will load most of the public parts of statsmodels. This makes most functions and classes conveniently available within one or two ......
Read more >what is the difference between import statsmodels.api as ...
1 Answer 1 · import statsmodels as sm makes your sm refer to statsmodels -- which is to say, statsmodels/__init__.py . · import...
Read more >remove_data= option does not appear to remove data fully
Under statsmodels version 0.11.0, remove_data=True appears to successfully remove wendog and wexog by itself. So this appears to be a new issue.
Read more >Logistic Regression using Statsmodels
Logistic Regression using Statsmodels ... import statsmodels.api as sm ... a substitute for the R-squared value in Least Squares linear ...
Read more >Logistic Regression in Python with statsmodels
Imports. First we need import Pandas and the statsmodels Formula API. Convention is to alias statsmodels.formula.api to smf .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thank you!
Hey! If this issue is open I would be interested in helping out 😃