-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
64 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,5 @@ jobs: | |
- name: Run Python module | ||
run: python src/process.py | ||
|
||
- name: Run Python module | ||
run: python src/train.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,31 @@ | ||
"""Contient entrainement du modele.""" | ||
import pandas as pd | ||
from utils import load_data | ||
from utils import split_dataset | ||
from utils import encoding | ||
from utils import normalize | ||
from utils import training | ||
from utils import evaluate_model | ||
|
||
def training(): | ||
pass | ||
# Loading cleaned data | ||
data = load_data("C:/Users/USER/Documents/Master2 DIT/Outil versioning/branche1/arborescence_tree/data/cleaned/cleaned_data.csv") | ||
|
||
# Splitting data | ||
y = data['label'] | ||
X = data.drop('label', axis=1) | ||
X_train, X_test, y_train, y_test = split_dataset(X, y) | ||
|
||
# y Label encoding | ||
y_train = encoding(y_train) | ||
y_test = encoding(y_test) | ||
|
||
# Normalize X features | ||
X_train = normalize(X_train) | ||
X_test = normalize(X_test) | ||
|
||
# Training | ||
y_pred = training(X_train, y_train, X_test) | ||
|
||
# Evaluate model | ||
accuracy, report = evaluate_model(y_test, y_pred) | ||
print(f"The accuracy is {accuracy}") | ||
print(f"The report is \n {report}") |
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