휴일 예측 정확도를 높이기 위한 Cascade ML Approach

왜 이 글을 썼는가?

  • At DoorDash, we generate supply and demand forecasts to proactively plan operations such as acquiring the right number of Dashers (delivery drivers) and adding extra pay when we anticipate low supply. It is challenging to generate accurate forecasts during holidays because certain machine learning techniques (e.g., XGBoost, Gradient Boosting, Random Forest) have difficulty handling high variation with limited data

Tree Model의 한계성

  • In particular, tree-based models fail to capture high variation during holidays even with one-hot encoding because each holiday only appears once a year. Please see a simplified example of this in Figure 2 below.
  • 휴일별 특성을 담는 것이 아니라, 휴일들이 특정 기준에 의해 Terminal Note에 묶여져 평균으로 묶일 수 있게 된다.  7월 4일, 추수감사절, 크리스마스 감소추세가 동일하게 계산된다.

Approach

  • reframing, rebalancing, and multilabel ensembles 등이 그간 쓰였음
  • 일반적인 방식은 Cascading ML Approach
  • ML문제를 나눠서 해결한다.
  • Machine Learning Design Patterns
  • Holiday, Regular Day를 나눠서 예측 →  이 경우 Time Series에서는 사용하기 어려움
  • To prevent losing the most recent information, we implemented an augmented version of a cascade design pattern tailored for time-series forecasting. As shown in Figure 3, instead of building two models, we correct the actual series by removing holiday impact so that recent historical information is available when producing forecasts following a holiday.

As-Is

  • GBM with wMAPE
  • 크리스마스 언저리에서 하락하는게 보임

To-Be

Calculating holiday multipliers:

  • we leverage parallel computation in Spark and store the holiday multipliers into a table for the GBM model to use in the preprocessing step.

Preprocessing holiday multipliers and model training

  • we train and store the GBM model.

Generating forecasts and post-processing

  • Because the GBM model was trained with non-holiday data, our initial forecasts do not take holidays into account.
  • For example, if the non-holiday forecast for Thanksgiving Day is 150 and the associated multiplier is 1.5 for a given starting point, the final forecast is 100 (=150/1.5).


- 운영및 재무팀 개입을 최소하기 위한 구조에 적합한 형태(확장 가능하기 용이)
- 성능 개선을 이끄는데 성공

한계

  • Switchback Experiment Design 채용 불가
  • 네트워크효과로 인한 간섭가능성 때문에
  • here is more info on switchbacks
  • 목표 설정의 어려움(비즈니스가 더 우선순위이니...)
  • Consequently, we had to reframe our experiment’s goal. Rather than accurately measuring the cascade approach’s impact, we decided to focus on ensuring that it does not worsen quality. If we could keep metrics flat without seeing quality degrade across a set of selected holidays, we could then make the decision to ship.

결과

  • Even though calculating the holiday multipliers seems like an extra step, they helped us to explain the forecasts to our stakeholders, which built more trust in our models and accelerated the transition to end-to-end ML solutions with minimal manual intervention.
  • ML practitioners should evaluate the pros and cons before deciding to use the cascade design pattern.  If the process adds significant complexity to the model architecture with only limited gains in target loss, it may not be worth the effort.

References

Read more

내가 놓치고 있던 미래, 먼저 온 미래를 읽고

내가 놓치고 있던 미래, 먼저 온 미래를 읽고

장강명 작가의 책은, 유학시절 읽고 처음이었다. 유학시절 "한국이 싫어서"라는 책은 동기부여가 상당히 되는 책이었다. 한국을 떠나 새로운 정채성을 학생으로서 Build up 해나가고 있던 상황에서 이 책은 제목부터 꽤 솔깃하였다. 물론 결말이 기억날 정도로 인상깊은 책은 아니었지만 말이다. 그렇게 시간이 흘러 장강명 작가의 책은 더 이상 읽지 않던

By Bongho, Lee
고객 경험이란 무엇일까?

고객 경험이란 무엇일까?

고객경험이란 무엇일까? 1. 과거 어느 대형 프로젝트에서 있던 일이다. 신사업을 위해서 예측 모델 값을 제공해야 하는 상황이었다. 데이터도 없고,어느정도의 정확도를 제공해야 하는지 답이 없었다. 점추정을 할 것인가? 구간 추정을 할 것인가를 가지고 논의중이었다. Product Manager 줄기차게 고객경험을 내세우며 점추정으로 해야 한다고 주장하였다. 근거는 오롯이 "고객 경험"이었다.

By Bongho, Lee
수요예측, 수정구슬이 아닌 목표를 향한 냉정한 나침반

수요예측, 수정구슬이 아닌 목표를 향한 냉정한 나침반

수요예측의 정의와 비즈니스에서의 중요성 기업의 성장과 운영 효율화를 위해 **수요예측(Demand Forecasting)**은 선택이 아닌 필수 요소로 자리 잡았다. 많은 경영진들이 수요예측을 미래 판매량을 정확히 맞히는 '예언'으로 기대하지만, 이는 수요예측의 본질을 오해하는 것이다. 수요예측의 진짜 의미: 미래를 점치는 수정구슬이 아니라, 우리가 도달해야 할 '목표'를

By Bongho, Lee