(Dalpha) Gobro - Optimization of Fruit Order Quantity (progressing)

Data

stockhistory_search data

  • Date
  • Branch
  • Product name
  • Description
    • In
    • Out
  • value
    • negative: Out (Sold)
    • positive: In (Order)
  • Reason of value

reqhistory_search

  • Date
  • Branch
  • Product name
  • Order quantity
  • Unit price
  • Total price
  • Receiving day

Visualization

Orange one is the total order quantity. And Blue one is the total sales volumes.

Their sales volumes look like a random walk, being similar with a stock price.

Hypothesis

  • It is impossible to predict with no-error. Nevertheless it can do, it is more effective to focus on an another part.
  • A prediction model should be robust to short-period data (all of the client's data is less than 90 days.) So, I think classical model would be better than any other fancy models.

Research models

Candidates

  • Time Series LLMs
  • ML models

First, I compared ML models, Prophet and LightGBM. There are a lot of models but I chose these 2 models. Since I didn't have much time to research, I did a naive experiment, identifying the metrics, MAE and RMAE. I couldn't find results comparing them before, but only kept the visualization of Prophet's prediction.

Prophet showed an error persentage of less than 20%. I thought it was sufficient. Next, I compared it with TimesFM for 3 branches. Simultaneously, I compared hourly and daily predictions.

Branch 1

Prophet
daily

  • MAE: 1.63
  • RMSE: 2.8

hourly

  • MAE: 1.62
  • RMSE: 2.27

TimesFM
daily

  • MAE: 2.01
  • RMSE: 2.57

hourly

  • MAE: 1.68
  • RMSE: 2.81

Branch 2

Prophet
daily

  • MAE: 7.17
  • RMSE: 8.47

hourly

  • MAE: 6.57
  • RMSE: 8.22

TimesFM
daily

  • MAE: 5.36
  • RMSE: 6.37

hourly

  • MAE: 5.55
  • RMSE: 7.38

Branch 3

Prophet
daily

  • MAE: 3.67
  • RMSE: 4.45

hourly

  • MAE: 1.60
  • RMSE: 2.17

TimesFM
daily

  • MAE: 2.06
  • RMSE: 2.55

hourly

  • MAE: 2.38
  • RMSE: 3.24

Conclusion

  1. No matter what model was used, hourly predicting was better in terms of the metrics and also the qualitative graph assessment.
  2. Prophet showed robustness to noise. Branch 3 had severe noise before the evaluation time so that both TimesFM and the Daily prediction of Prophet produced poor results. Besides, hourly prediction of Prophet is quite robust.

-> I selected the Prophet model and hourly prediction.


(still progressing)