Commit d18d5981 authored by Joaquin Torres's avatar Joaquin Torres

Renamed model_selection to model_building

parent 0e3f17be
......@@ -40,17 +40,17 @@ This repository is organized as follows:
* [EDA.ipynb](./EDA/EDA.ipynb): Exploring and filtering data, handling missing values, encoding variables, building the final pre- and post- pandemic datasets, and generating plots for feature distributions, correlations and importance.
* [gen_train_data](./gen_train_data):
* [gen_train_data.ipynb](./gen_train_data/gen_train_data.ipynb): Generating training and testing datasets for each of the pipelines.
* [model_selection](./model_selection):
* [hyperparam_tuning.py](./model_selection/hyperparam_tuning.py): Tuning models through a random search of hyperparameters.
* [cv_metric_gen.py](./model_selection/cv_metric_gen.py): Generating cross-validation metrics and plots for each of the tuned models.
* [cv_metrics_distr.py](./model_selection/cv_metrics_distr.py): Generating boxplots for each cross-validation metric and tuned model.
* [test_models.py](./model_selection/test_models.py): Testing tuned models with test dataset.
* [fit_final_models.py](./model_selection/fit_final_models.py): Saving fitted model for each selected final model.
* [results](./model_selection/results):
* [hyperparam](./model_selection/output/hyperparam): Excel file containing the optimal hyperparameters for each model in each pipeline.
* [cv_metrics](./model_selection/output/cv_metrics): Material related to the results of cross-validation: scores, ROC and Precision-Recall curves and boxplots for each metric.
* [testing](./model_selection/output/testing): Material related to the results of testing the tuned models: scores, ROC and Precision-Recall curves and confusion matrices.
* [fitted_models](./model_selection/output/fitted_models): Final selected trained models.
* [model_building](./model_building):
* [hyperparam_tuning.py](./model_building/hyperparam_tuning.py): Tuning models through a random search of hyperparameters.
* [cv_metric_gen.py](./model_building/cv_metric_gen.py): Generating cross-validation metrics and plots for each of the tuned models.
* [cv_metrics_distr.py](./model_building/cv_metrics_distr.py): Generating boxplots for each cross-validation metric and tuned model.
* [test_models.py](./model_building/test_models.py): Testing tuned models with test dataset.
* [fit_final_models.py](./model_building/fit_final_models.py): Saving fitted model for each selected final model.
* [results](./model_building/results):
* [hyperparam](./model_building/output/hyperparam): Excel file containing the optimal hyperparameters for each model in each pipeline.
* [cv_metrics](./model_building/output/cv_metrics): Material related to the results of cross-validation: scores, ROC and Precision-Recall curves and boxplots for each metric.
* [testing](./model_building/output/testing): Material related to the results of testing the tuned models: scores, ROC and Precision-Recall curves and confusion matrices.
* [fitted_models](./model_building/output/fitted_models): Final selected trained models.
* [explainability](./explainability):
* [compute_shap_vals.py](./explainability/compute_shap_vals.py): Computing SHAP values for final models.
* [compute_shap_inter_vals.py](./explainability/compute_shap_inter_vals.py): Computing SHAP interaction values for final models.
......
......@@ -70,7 +70,7 @@ if __name__ == "__main__":
print(f"{group}-{method_names[j]}")
method_name = method_names[j]
model_name = model_choices[method_name]
model_path = f"../model_selection/results/fitted_models/{group}_{method_names[j]}_{model_name}.pkl"
model_path = f"../model_building/results/fitted_models/{group}_{method_names[j]}_{model_name}.pkl"
# Load the fitted model from disk
with open(model_path, 'rb') as file:
fitted_model = pickle.load(file)
......
......@@ -70,7 +70,7 @@ if __name__ == "__main__":
print(f"{group}-{method_names[j]}")
method_name = method_names[j]
model_name = model_choices[method_name]
model_path = f"../model_selection/results/fitted_models/{group}_{method_names[j]}_{model_name}.pkl"
model_path = f"../model_building/results/fitted_models/{group}_{method_names[j]}_{model_name}.pkl"
# Load the fitted model from disk
with open(model_path, 'rb') as file:
fitted_model = pickle.load(file)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment