Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DataSynthis_ML_JobTask - Stock Price Forecasting (Deliverables)
|
| 2 |
+
This bundle contains a ready-to-run Jupyter notebook, a small synthetic sample dataset, and helper scripts for training ARIMA, LSTM, and Prophet models; evaluating them with rolling-window evaluation; and steps to deploy model artifacts to Hugging Face Hub (you must run that step locally or from an environment with internet access).
|
| 3 |
+
|
| 4 |
+
## Files included
|
| 5 |
+
- `stock_forecasting_notebook.ipynb` — The full notebook with preprocessing, ARIMA, LSTM, Prophet, rolling-window evaluation, plots, and saving models.
|
| 6 |
+
- `sample_stock.csv` — A synthetic daily closing-price CSV (2020-01-01 to 2021-12-31, business days) to run the notebook offline.
|
| 7 |
+
- `requirements.txt` — Python dependencies.
|
| 8 |
+
- `upload_to_hf.py` — Example script to upload model files to Hugging Face Hub (requires `huggingface_hub` and HF token).
|
| 9 |
+
- `README.md` — This file.
|
| 10 |
+
|
| 11 |
+
## Quick start
|
| 12 |
+
1. Create and activate a python environment (recommended: conda or venv)
|
| 13 |
+
```bash
|
| 14 |
+
python -m venv venv
|
| 15 |
+
source venv/bin/activate # Linux/macOS
|
| 16 |
+
venv\Scripts\activate # Windows
|
| 17 |
+
pip install -r requirements.txt
|
| 18 |
+
```
|
| 19 |
+
2. Start Jupyter and open the notebook:
|
| 20 |
+
```bash
|
| 21 |
+
jupyter notebook stock_forecasting_notebook.ipynb
|
| 22 |
+
```
|
| 23 |
+
3. The notebook contains cells to download real stock data via `yfinance` (if you have internet) or use the included `sample_stock.csv` for an offline demo.
|
| 24 |
+
|
| 25 |
+
## Hugging Face deployment (notes)
|
| 26 |
+
- You cannot deploy directly from this notebook in an environment without internet.
|
| 27 |
+
- Use `upload_to_hf.py` to push saved model files to the HF repo `DataSynthis_ML_JobTask` after creating it on the Hugging Face website (or the script will create the repo for you if you provide a valid token).
|
| 28 |
+
- Create a HF token at https://huggingface.co/settings/tokens and set environment variable `HF_TOKEN` or pass `--token` to the script.
|
| 29 |
+
|
| 30 |
+
## About results
|
| 31 |
+
- The notebook runs quick examples and shows how to compute RMSE and MAPE, and how to perform rolling-window evaluation.
|
| 32 |
+
- For production-quality training and evaluation (e.g., longer LSTM training), run on a machine with a GPU and more data.
|
| 33 |
+
|