Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mhc_rank
Manage
Activity
Members
Labels
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
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Patrick Skillman-Lawrence
mhc_rank
Commits
e56cb7fa
Commit
e56cb7fa
authored
9 years ago
by
Alex Rubinsteyn
Browse files
Options
Downloads
Patches
Plain Diff
look at DF before returning it
parent
d0946bdc
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
experiments/nips2015-model-selection.py
+9
-6
9 additions, 6 deletions
experiments/nips2015-model-selection.py
with
9 additions
and
6 deletions
experiments/nips2015-model-selection.py
+
9
−
6
View file @
e56cb7fa
...
...
@@ -293,7 +293,10 @@ def leave_out_allele_cross_validation(
result_dict
[
"
%s_std
"
%
name
].
append
(
np
.
std
(
values
))
result_dict
[
"
%s_min
"
%
name
].
append
(
np
.
min
(
values
))
result_dict
[
"
%s_max
"
%
name
].
append
(
np
.
max
(
values
))
return
pd
.
DataFrame
(
result_dict
)
print
(
result_dict
)
df
=
pd
.
DataFrame
(
result_dict
)
print
(
df
)
return
df
def
evaluate_model_config
(
...
...
@@ -386,15 +389,15 @@ if __name__ == "__main__":
groups
=
combined_df
.
groupby
(
hyperparameter_name
)
for
hyperparameter_value
,
group
in
groups
:
aucs
=
group
[
"
auc_mean
"
]
accuraci
es
=
group
[
"
accuracy
_mean
"
]
f1_scor
es
=
group
[
"
f1
_mean
"
]
unique_configs
=
group
[
"
config_idx
"
].
unique
()
print
(
"
-- %s (%d): AUC=%0.4f/%0.4f/%0.4f,
Acc
=%0.4f/%0.4f/%0.4f
"
%
(
"
-- %s (%d): AUC=%0.4f/%0.4f/%0.4f,
F1
=%0.4f/%0.4f/%0.4f
"
%
(
hyperparameter_value
,
len
(
unique_configs
),
np
.
percentile
(
aucs
,
25.0
),
np
.
percentile
(
aucs
,
50.0
),
np
.
percentile
(
aucs
,
75.0
),
np
.
percentile
(
accuraci
es
,
25.0
),
np
.
percentile
(
accuraci
es
,
50.0
),
np
.
percentile
(
accuraci
es
,
75.0
)))
np
.
percentile
(
f1_scor
es
,
25.0
),
np
.
percentile
(
f1_scor
es
,
50.0
),
np
.
percentile
(
f1_scor
es
,
75.0
)))
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