You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Runprediction_research.py which then loads the downloaded data, trains a few models, evaluatesthem and finally stores some information about which model scored the best (lowest RMSE)
The last step above dumps the evaluation results under theoutput_dir/YYYYmmddHHMMSS/evaluation_results.csv
Runparse_evaluation_results.py to find out the best overall model
$ python parse_evaluation_results.py --evaluation_results_file=<path to the csv>
This will print out some statistics and highlight the best model overall for all stocks
NOTE: the script currently picks the model with the min RMSE at p95
Training the selected/best model on all stocks
Now that we have found the model that works best overall across all stocks,we need to train it on all the stocks individually and save the model per stock. For example, ifthe evaluation results were saved atoutput/20240609185957/evaluation_results.csv and the stock data is inthedata directory, running the following command would parse the model selected via grid search cvfor each stock and save the model and scaler objects under the same output directory.
For example, if the model selected wasXGBRegressor, then in the diroutput/20240609185957 there willbe files of the format{ticker}_XGBRegressor.pkl and{ticker}_Scaler.pkl.