只有一部分包装有效,pygam

时间:2018-10-29 13:42:08

标签: python machine-learning gam

我使用了conda来安装软件包pygam

根据示例代码,对于LinearGAMLogisticGAM之类的类,其功能可以拟合和预测,但我无法访问terms对象。 (昨晚有效)

gam


LinearGAM(callbacks=[Deviance(), Diffs()], constraints=None, 
   dtype='auto', fit_intercept=True, fit_linear=False, 
   fit_splines=True, lam=0.6, max_iter=100, n_splines=25, 
   penalties='auto', scale=None, spline_order=3, tol=0.0001, 
   verbose=False)


gam.terms

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-97-e7c78df77f0c> in <module>
----> 1 gam.terms

AttributeError: 'LinearGAM' object has no attribute 'terms'

from pygam import LinearGAM有效

但是, from pygam import s不是

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-105-de46d9d5d0c0> in <module>
----> 1 from pygam import s

ImportError: cannot import name 's'

from pygam.datasets import toy_classification

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-104-d9231b1e2864> in <module>
----> 1 from pygam.datasets import toy_classification

ModuleNotFoundError: No module named 'pygam.datasets'

我重新安装了conda,但无法解决问题

0 个答案:

没有答案