Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Susheel Busi
EukClassify
Compare Revisions
2344bd2d401704228d39fd2d538abc642ac6077c...651c1203106eb4faf3e79308ac36f19d8c57f1e1
You need to sign in or sign up before continuing.
Commits (2)
Update grid_search.py
· adae8d3c
Mass23
authored
Sep 02, 2021
adae8d3c
Merge branch 'Mass23-master-patch-17254' into 'master'
· 651c1203
Susheel Busi
authored
Sep 02, 2021
Update grid_search.py See merge request
!24
651c1203
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
scripts/grid_search.py
scripts/grid_search.py
+4
-4
No files found.
scripts/grid_search.py
View file @
651c1203
...
...
@@ -68,16 +68,16 @@ def grid_search(X, y, model, emb_func, trans_func, param_grid, scorings, cv, cor
scores
=
cross_validate
(
grid_search
,
X
,
y
,
scoring
=
scorings
,
n_jobs
=
cores
,
cv
=
outer_cv
)
# store the result in a dataframe
best_params
=
grid_search
.
best_
estimator
_
best_params
=
grid_search
.
best_
params
_
print
(
best_params
)
print
(
scores
)
metrics
=
list
(
scorings
.
keys
())
res
=
dict
()
for
param
in
param_grid
.
keys
():
print
(
param
)
res
[
param
]
=
best_params
[
param
.
split
(
'__'
)[
1
]]
for
param
in
best_params
.
keys
():
res
[
param
]
=
best_params
[
param
]
for
metric
in
metrics
:
res
[
metric
]
=
scores
[
metric
]
df
=
pd
.
DataFrame
.
from_dict
(
res
)
return
df