인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

babelaidub1494's profile image
babelaidub1494

asked

[For Beginners] Machine Learning with Kaggle • Deep Learning Analysis

Estimating the order of a time series

[해결] 시계열 차수 추정하기 코드 에러 수정

Resolved

Written on

·

634

5

from statsmodels.graphics.tsaplots import plot_pacf plot_pacf(pacf, lags=20, method='ols', title='pa').show

ValueError: Can only compute partial correlations for lags up to 50% of the sample size. The requested nlags 20 must be < 10.

이런 에러가 떠서 좀 헤맸네요.

 

결론적으로 선생님 코드

from statsmodels.tsa.stattools import pacf

pacf = pacf(df['cnt'], nlags=20, method='ols')

print(pacf)

from statsmodels.graphics.tsaplots import plot_pacf

plot_pacf(pacf, lags=20, method='ols', title='pa').show

from statsmodels.tsa.stattools import pacf

pacf_values = pacf(df['cnt'], nlags=20, method='ols')

print(pacf_values)

from statsmodels.graphics.tsaplots import plot_pacf

plot_pacf(df['cnt'], lags=20, method='ols', title='pa').show

 

로 바꿔주시면 에러 없이 차트 표출이 됩니다.

 

 

 

 

 

 

 

 

 

 

 

 

 

머신러닝딥러닝kaggle코드에러수정

Answer

This question is waiting for answers
Be the first to answer!
babelaidub1494's profile image
babelaidub1494

asked

Ask a question