# 62th Place Solution - Last Value and Rule-based Multiplier

Validation
Validation is really important for problems like this. I baffled by lots of people validating on last month without any gap. Replicating test set split was essential for the validation scheme so I used 8 folds of 2 months gap and 3 months validation with expanding window over the entire dataset. I also added 3 additional folds with their training period ending on December for simulating new year transitions. I had 11 folds but I didn't necessarily use all of them at the same time.
Models
I tried some models but none of them improved my validation score so I had to use last value baseline. These are the models and techniques I tried:
Linear regression, LightGBM and XGBoost with raw and external pivoted features from GoDaddy Venture Forward Data Hub
Linear regression with normalized month and target for each county
ARIMA, SARIMAX and other auto-regressive model variations for each county
Directly optimizing a multiplier for last value using bayesian optimization
Last value and a ruled-based multiplier
Last Value + Rule-based Multiplier
As everyone knows, this was a quite strong baseline. I wasn't able to beat this with other models so I decided to improve it by making data-driven decisions.
First thing I did was adjusting last values to new year which is mentioned
[here](https://www.kaggle.com/competitions/godaddy-microbusiness-density-forecasting/discussion/389215)
by
[@cdeotte](https://www.kaggle.com/cdeotte)
. I got similar validation score boost when I tested this adjustment on my last three folds that were simulating new year transitions.
The other thing I did was checking last 5 target values of each county:
If target increased every time: Last value is multiplied with 1.010 for March, 1.015 for April and 1.015 May
If target decreased every time: Last value is multiplied with 0.998 for March, 0.994 for April and 0.990 May
If target was making sideways (else case): Last value is multiplied with 1.010 for March, April and May
Lots of time passed since submissions are closed so I don't remember my exact validation scores but I remember that I got a significant boost with this approach. I didn't use Kaggle notebooks on this competition either. I was generating submissions on local and uploading them. This repository is the only thing I can share…
[https://github.com/gunesevitan/godaddy-microbusiness-density-forecasting/](https://github.com/gunesevitan/godaddy-microbusiness-density-forecasting/)
and this is the script that generates 67th place predictions.
[https://github.com/gunesevitan/godaddy-microbusiness-density-forecasting/blob/main/src/county_models/last_value.py](https://github.com/gunesevitan/godaddy-microbusiness-density-forecasting/blob/main/src/county_models/last_value.py)