在mac环境下执行遇到的问题

我主要运行的是《金融信贷风控的机器学习》第4课的时候出现的问题
这个是pip的列表
(venv) localhost:lesson4 lianwenbo$ pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
backports.functools-lru-cache (1.5)
cycler (0.10.0)
kiwisolver (1.0.1)
matplotlib (2.2.0)
numpy (1.14.1)
pandas (0.22.0)
patsy (0.5.0)
pip (9.0.1)
pyparsing (2.2.0)
python-dateutil (2.6.1)
pytz (2018.3)
scikit-learn (0.19.1)
scipy (1.0.0)
seaborn (0.8.1)
setuptools (38.5.2)
six (1.11.0)
sklearn (0.0)
statsmodels (0.8.0)
subprocess32 (3.2.7)
wheel (0.30.0)
 
这个是
Optimization terminated successfully.
         Current function value: 0.330286
         Iterations 7
Traceback (most recent call last):
  File "scorecard.py", line 348, in <module>
    summary = LR.summary()
  File "/Users//learning/finance/venv/lib/python2.7/site-packages/statsmodels/discrete/discrete_model.py", line 2758, in summary
    yname_list)
  File "/Users//learning/finance/venv/lib/python2.7/site-packages/statsmodels/discrete/discrete_model.py", line 2550, in summary
    ('LLR p-value:', ["%#6.4g" % self.llr_pvalue])
  File "/Users//learning/finance/venv/lib/python2.7/site-packages/statsmodels/tools/decorators.py", line 97, in __get__
    _cachedval = self.fget(obj)
  File "/Users//learning/finance/venv/lib/python2.7/site-packages/statsmodels/discrete/discrete_model.py", line 2405, in llr_pvalue
    return stats.chisqprob(self.llr, self.df_model)
AttributeError: 'module' object has no attribute 'chisqprob'
 
 
image.png image.png

yuching93

赞同来自:

result.summary2()

要回复问题请先登录注册