StanislavYatsevich / Store_Sales

The project is aimed at stores' sales prediction
0 stars 0 forks source link

bfill for filling gaps #14

Open astraszab opened 3 weeks ago

astraszab commented 3 weeks ago

https://github.com/StanislavYatsevich/Store_Sales/blob/9c10a6aec4c0ceecd40d976e48cf62c6d8003f37/src/store_sales/functions.py#L81C23-L81C28

Why bfill is used to fill gaps in the data? Are there any assumptions behind it to work properly? Are these assumptions confirmed to be true when calling the method? What other options were considered?

StanislavYatsevich commented 3 weeks ago

https://github.com/StanislavYatsevich/Store_Sales/blob/9c10a6aec4c0ceecd40d976e48cf62c6d8003f37/src/store_sales/functions.py#L81C23-L81C28

Why bfill is used to fill gaps in the data? Are there any assumptions behind it to work properly? Are these assumptions confirmed to be true when calling the method? What other options were considered?

That's a good point to observe. Actually I chose this method some months ago because I had the first value equal to "NaN" in the dataset, and therefore I couldn't use the standard ffill method. Now I have read more about different filling methods and chose the 'time' as the optimal one because it interpolates missing values depending on other known values and time distance between them. 37fc238