Model training and experimentation with Comet ML
- Create the virtual environment with Poetry
- Generate training data
- Build a baseline model
- Build Machine Learning models
1. Create the virtual environment with Poetry
-
Create a Python virtual environment with all project dependencies with
$ curl -sSL https://install.python-poetry.org | python3 - $ poetry install
or simply use the
Makefile
$ make init
-
Activate the virtual environment you just created
$ poetry shell
-
Sign up for Comet ML for FREE, create a workspace and copy your API key from the dashboard.
-
Set your API key and workspace name variables in
set_environment_variables_template.sh
, rename the file and run it$ . ./set_environment_variables.sh
Your local development environment is ready. Let's now generate some training data.
Download historical data from Coinbase and save it locally to disk
- Run either
$ python src/data.py
, or - Simply
$ make data
- Establish a baseline performance using a very dummy (yet powerful) baseline model
$ python src/baseline_model.py
-
Here is the list of experiments I ran
$ python src/baseline_model.py $ python src/train.py --model lasso $ python src/train.py --model lasso --tune-hyperparams --hyperparam-trials 3 $ python src/train.py --model lightgbm $ python src/train.py --model lightgbm --tune-hyperparams --hyperparam-trials 3
-
Feel free to try adding more features, using other technical indicators, or experiment with other ML models.