More train

main
Gasper Spagnolo 2022-09-05 13:50:10 +02:00
parent 9de820674b
commit defc1ead70
1 changed files with 6 additions and 6 deletions

12
main.py
View File

@ -6,12 +6,12 @@ from datetime import datetime, timezone, timedelta
import calendar import calendar
rf_reg_grid = { rf_reg_grid = {
'bootstrap': [True, False], 'bootstrap': [True],
'max_depth': [5, 10, 70, 90, 100, None], 'max_depth': [5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, None],
'max_features': ['auto', 'sqrt'], 'max_features': ['auto', 'sqrt', 'log2'],
'min_samples_leaf': [1, 2, 4, 6], 'min_samples_leaf': [1, 2, 4, 6],
'min_samples_split': [2, 5, 10, 12], 'min_samples_split': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12],
'n_estimators': [100, 200] 'n_estimators': [80, 90, 100, 120, 150, 200]
} }
best_params = { best_params = {
@ -132,7 +132,7 @@ def main():
# Prepare data for moddeling # Prepare data for moddeling
df = process_data(df=df) df = process_data(df=df)
# Split data into train and test sets # Split data into train and test sets
X_train, X_test, y_train, y_test = split_data(df=df, split_value=0.82) X_train, X_test, y_train, y_test = split_data(df=df, split_value=0.95)
# Model the data # Model the data
model = find_best_hyperparameters_and_train( model = find_best_hyperparameters_and_train(