Data setup
| unique_id | ds | y | weight | |
|---|---|---|---|---|
| 0 | id_0 | 2000-01-01 | 0.357595 | 0.636962 |
| 1 | id_0 | 2000-01-02 | 1.301382 | 0.269787 |
Creating forecast object
Forecasting
You can provide theweight_col argument to
MLForecast.fit
to indicate which column should be used as the sample weights.
| unique_id | ds | lr | lgbm | |
|---|---|---|---|---|
| 0 | id_0 | 2000-08-10 | 3.336019 | 5.283677 |
| 1 | id_1 | 2000-04-07 | 3.300786 | 4.230655 |
Cross validation
You can provide theweight_col argument to
MLForecast.cross_validation
to indicate which column should be used as the sample weights.
| unique_id | ds | cutoff | y | lr | lgbm | |
|---|---|---|---|---|---|---|
| 0 | id_0 | 2000-08-08 | 2000-08-07 | 3.436325 | 2.770717 | 3.242790 |
| 1 | id_1 | 2000-04-05 | 2000-04-04 | 2.430276 | 2.687932 | 2.075247 |
| 2 | id_0 | 2000-08-09 | 2000-08-08 | 4.136771 | 3.095140 | 4.239010 |
| 3 | id_1 | 2000-04-06 | 2000-04-05 | 3.363522 | 3.016661 | 3.436962 |

