Prophet (2)

고독한 키쓰차·2021년 4월 21일
0

Time Series

목록 보기
3/6

add_regressor

  • 반드시 binary 데이터만 되는게 아니라 시계열 데이터도 가능
  • 사용되어지는 regressor 가 target 보다 예측하기가 더 쉬워야함
  • add_regressor 에 사용되어지는 변수는 과거, 미래 데이터 포함되어야함
  • regressor 와 target 과의 coefficient 측정 가능 (regressor_coefficients)

Multiplicative Seasonality

# Python
m = Prophet(seasonality_mode='multiplicative')
m.fit(df)
forecast = m.predict(future)
fig = m.plot(forecast)
  • Seasonality 가 존재하지만, 그 gap 이 더 커질때 사용하면 좋음
    예)

  • 추가되어지는 add_regressor 에 독립적으로 적용 가능, default 는 모델의 multiplicative seasonality 를 따라감

Uncertainty in the trend

  • 미래 불확실성을 예측할 수 있는 매개변수중 하나는 interval_width , changepoint_prior_scale(이게 크면 미래 불확실성에 대해 열려있는거임)

Outlier

  • outlier 삭제하고 해도 됨 (결측치 영향끼치지않음)

월별, 혹은 주별 데이터 Holiday 어떻게?

  • 만약, 월이 고정되어있는 데이터는 넣어줄 필요 없음, 하지만 월이 조금씩 바뀔경우 0401/ 0501 이런식으로 넣어줄것

How to use cross validation

  • the length of time each forecast should cover (horizon) -> 내가 예측하고자 하는 량
  • how frequently to make forecasts (period) -> 추가로 훈련하고자 하는 량 in every iteration
  • the amount of data to train on before making any predictions (initial) -> 내가 훈련하고자 하는 데이터의량
  • parallel option -> dask 하면 속도 더 빨라짐
    링크텍스트
profile
Data Scientist or Gourmet

0개의 댓글