Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BigData
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Majorczyk
BigData
Commits
4309d0ab
Commit
4309d0ab
authored
4 months ago
by
Mohamed Sebabti
Browse files
Options
Downloads
Patches
Plain Diff
modid rn
parent
9e422955
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ml_rn.py
+3
-3
3 additions, 3 deletions
ml_rn.py
model_rn.txt
+367
-1
367 additions, 1 deletion
model_rn.txt
with
370 additions
and
4 deletions
ml_rn.py
+
3
−
3
View file @
4309d0ab
import
numpy
as
np
import
numpy
as
np
import
pandas
as
pd
import
pandas
as
pd
from
sklearn.model_selection
import
train_test_split
from
sklearn.model_selection
import
train_test_split
,
GridSearchCV
from
sklearn.preprocessing
import
StandardScaler
from
sklearn.preprocessing
import
StandardScaler
from
sklearn.metrics
import
mean_absolute_error
,
mean_squared_error
,
r2_score
from
sklearn.metrics
import
mean_absolute_error
,
mean_squared_error
,
r2_score
import
time
import
time
...
@@ -44,7 +44,7 @@ def train_mlp(df):
...
@@ -44,7 +44,7 @@ def train_mlp(df):
# 5. Recherche des meilleurs hyperparamètres avec GridSearchCV
# 5. Recherche des meilleurs hyperparamètres avec GridSearchCV
mlp
=
MLPRegressor
(
random_state
=
42
)
mlp
=
MLPRegressor
(
random_state
=
42
)
grid_search
=
GridSearchCV
(
mlp
,
param_grid
,
cv
=
3
,
scoring
=
'
r2
'
,
n_jobs
=-
1
,
verbose
=
2
)
grid_search
=
GridSearchCV
(
mlp
,
param_grid
,
cv
=
3
,
scoring
=
'
r2
'
,
verbose
=
2
)
grid_search
.
fit
(
X_train_scaled
,
y_train
)
grid_search
.
fit
(
X_train_scaled
,
y_train
)
# 6. Affichage des meilleurs paramètres
# 6. Affichage des meilleurs paramètres
...
...
This diff is collapsed.
Click to expand it.
model_rn.txt
+
367
−
1
View file @
4309d0ab
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment