EnYa32 commited on
Commit
e84f2f0
ยท
verified ยท
1 Parent(s): 26ec142

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -7
README.md CHANGED
@@ -1,8 +1,8 @@
1
  ---
2
  title: TimeSeriesForecasting
3
- emoji: ๐Ÿš€
4
- colorFrom: red
5
- colorTo: red
6
  sdk: docker
7
  app_port: 8501
8
  tags:
@@ -12,9 +12,33 @@ short_description: LightGBM-based time series forecasting app that predicts...
12
  license: mit
13
  ---
14
 
15
- # Welcome to Streamlit!
16
 
17
- Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
18
 
19
- If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
20
- forums](https://discuss.streamlit.io).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: TimeSeriesForecasting
3
+ emoji: ๐Ÿ“ˆ
4
+ colorFrom: blue
5
+ colorTo: green
6
  sdk: docker
7
  app_port: 8501
8
  tags:
 
12
  license: mit
13
  ---
14
 
15
+ # ๐Ÿ“ˆ Sales Forecast (LightGBM)
16
 
17
+ This Streamlit app predicts **`num_sold`** using a trained **LightGBM** model with time-based features and lag features.
18
 
19
+ ## What it does
20
+ - Takes calendar features (year/month/week/dayofweek/dayofyear, weekend)
21
+ - Uses lag features (lag_364, lag_365, lag_371)
22
+ - Uses categorical inputs (country/store/product) via saved encoders
23
+ - Outputs a `num_sold` prediction
24
+
25
+ ## Files required (put in the repo root)
26
+ - `app.py`
27
+ - `lgbm_model.pkl`
28
+ - `feature_names.pkl` (list of feature names in correct order)
29
+ - `encoders.pkl` (dict of LabelEncoders for `country`, `store`, `product`)
30
+ - `fill_map.pkl` (optional: medians for numeric feature filling)
31
+
32
+ ## How to save artifacts in your notebook (training side)
33
+
34
+ ```python
35
+ import joblib
36
+
37
+ joblib.dump(model_lgb, 'lgbm_model.pkl')
38
+ joblib.dump(FEATURES, 'feature_names.pkl')
39
+ joblib.dump(encoders, 'encoders.pkl')
40
+
41
+ # optional numeric medians for filling missing
42
+ num_cols = [c for c in FEATURES if c not in ['country', 'store', 'product']]
43
+ fill_map = train_fe[num_cols].median().to_dict()
44
+ joblib.dump(fill_map, 'fill_map.pkl')