shane-kercheval / oo-learning

Python machine learning library based on Object Oriented design principles; the goal is to allow users to quickly explore data and search for top machine learning algorithm candidates for a given dataset
MIT License
1 stars 0 forks source link

Add/Fix Caching to ModelStacker #5

Closed shane-kercheval closed 6 years ago

shane-kercheval commented 6 years ago

Cross Validation (and probably ModelFitter/etc.) have a build_cache_key function which gets the name of the model via model_name = type(model).__name__. This won’t work on ModelStacker, because there might be multiple ModelStackers, with different Base Models (and hyper params) and different stacking models (and hyper-params)

final structure:

ModelStacker_[stacking model type]_[hyper_params].pkl  # final stacked model
base_[Base Model Description 1].pkl  # first base model (trained on all data)
base_[Base Model Description 1].pkl  # second base model (trained on all data)
...
/resample_[Base Model Description 1]/...  # files associated with resample models of first base model
/resample_[Base Model Description 2]/...  # files associated with resample models of second base model
shane-kercheval commented 6 years ago

also refactored ModelSearcher file caching structure to have a folder for each tuned model, and a file for each final model.