Last active
November 28, 2021 15:31
-
-
Save keitazoumana/a51f0b887742796bb8299f6c889d3773 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Content of run_training.py | |
""" | |
import joblib | |
# Get customized functions from library | |
from packages.preprocess_data import * | |
from packages.train_model import run_model_training | |
# 0.Path to data | |
path_to_data = '../data/diabetes_data.csv' | |
# 1.Prepare the data | |
prepared_data = prepare_data(path_to_data) | |
# 2.Create train - test split | |
train_test_data = create_train_test_data(prepared_data['features'], | |
prepared_data['label'], | |
0.33, 2021) | |
# 3.Run training | |
model = run_model_training(train_test_data['x_train'], train_test_data['x_test'], | |
train_test_data['y_train'], train_test_data['y_test']) | |
# 4.Save the trained model and vectorizer | |
joblib.dump(model, '../model/diabete_detector_model.pkl') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment