首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >statsmodels:查找statsmodels.formula.api详细信息文档

statsmodels:查找statsmodels.formula.api详细信息文档
EN

Stack Overflow用户
提问于 2018-06-06 13:53:23
回答 1查看 851关注 0票数 1

statsmodels主页http://www.statsmodels.org/stable/index.html上的示例使用了statsmodels.api和statsmodels.formula.api,但我在索引/模块页面中找不到它们。

同时,我找不到( statsmodels.formula.api模块的) ols类,而是statsmodels.regression.linear_model模块的大写OLS类。对此感到困惑。

我可以在哪里获得statsmodels.formula.api.ols的详细信息?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-06-07 03:55:52

没有关于api的特定文档。文档主要针对单个类和函数。下面对不同的导入路径http://www.statsmodels.org/stable/importpaths.html进行简要说明

api.py主要是导入的集合,例如statsmodel api https://github.com/statsmodels/statsmodels/blob/master/statsmodels/api.py

代码语言:javascript
复制
from . import iolib
from . import datasets
from . import tools
from .tools.tools import add_constant, categorical
from . import regression
from .regression.linear_model import OLS, GLS, WLS, GLSAR
from .regression.recursive_ls import RecursiveLS
from .regression.quantile_regression import QuantReg
from .regression.mixed_linear_model import MixedLM
from .genmod import api as genmod
from .genmod.api import (GLM, GEE, OrdinalGEE, NominalGEE, families,
                         cov_struct,
                         BinomialBayesMixedGLM, PoissonBayesMixedGLM)
from . import robust
from .robust.robust_linear_model import RLM
from .discrete.discrete_model import (Poisson, Logit, Probit,
                                      MNLogit, NegativeBinomial,
                                      GeneralizedPoisson,
                                      NegativeBinomialP)
from .discrete.count_model import (ZeroInflatedPoisson,
                                   ZeroInflatedGeneralizedPoisson,
                                   ZeroInflatedNegativeBinomialP)
from .tsa import api as tsa
...

formula.api只是定义了模型https://github.com/statsmodels/statsmodels/blob/master/statsmodels/formula/api.pyfrom_formula方法的别名

代码语言:javascript
复制
from statsmodels.regression.linear_model import GLS
gls = GLS.from_formula
from statsmodels.regression.linear_model import WLS
wls = WLS.from_formula
from statsmodels.regression.linear_model import OLS
ols = OLS.from_formula
from statsmodels.regression.linear_model import GLSAR
glsar = GLSAR.from_formula
from statsmodels.regression.mixed_linear_model import MixedLM
mixedlm = MixedLM.from_formula
from statsmodels.genmod.generalized_linear_model import GLM
glm = GLM.from_formula
from statsmodels.robust.robust_linear_model import RLM
rlm = RLM.from_formula
from statsmodels.discrete.discrete_model import MNLogit
mnlogit = MNLogit.from_formula
from statsmodels.discrete.discrete_model import Logit
logit = Logit.from_formula
from statsmodels.discrete.discrete_model import Probit
probit = Probit.from_formula
from statsmodels.discrete.discrete_model import Poisson
poisson = Poisson.from_formula
from statsmodels.discrete.discrete_model import NegativeBinomial
negativebinomial = NegativeBinomial.from_formula
from statsmodels.regression.quantile_regression import QuantReg
quantreg = QuantReg.from_formula
from statsmodels.duration.hazard_regression import PHReg
phreg = PHReg.from_formula
from statsmodels.genmod.generalized_estimating_equations import (GEE,
     OrdinalGEE, NominalGEE)
gee = GEE.from_formula
ordinal_gee = OrdinalGEE.from_formula
nominal_gee = NominalGEE.from_formula
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50713058

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档