1. 회귀분석의 assertion error
https://stackoverflow.com/questions/54339260/when-i-use-pandas-statsmodels-i-get-an-assertionerror
when I use pandas statsmodels,i get an assertionerror
i'm trying the example of ordinary least squares the codes are in the following. import numpy as np import statsmodels.api as sm import statsmodels.formula.api as smf dat = sm.datasets.get_rdataset("
stackoverflow.com
데이터 처리가 잘못되었나 했는데 그건 아니고.
assertion error에 관해서는 더 살펴볼 필요가 있다....
2. stackoverflow에는 많은 답이 있다.
https://github.com/statsmodels/statsmodels/issues/5343
statsmodels.formula.api tokenize issue in Python 3.7.1 · Issue #5343 · statsmodels/statsmodels
I was able to use the formula api with OLS and glm, but once I upgraded to Python 3.7.1, I have this message: --------------------------------------------------------------------------- AssertionEr...
github.com
3. 버젼 문제를 어떻게 해결하나..
https://anaconda.org/anaconda/patsy
Patsy :: Anaconda Cloud
Description Patsy is a Python library for describing statistical models (especially linear models, or models that have a linear component) and building design matrices.
anaconda.org
설치하면 된다.
그런데 설치하고도 버젼 검사를 해보면 0.5.0으로 나옴.
컴터 재시작~
잘 돌아간다.