Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bolsonaro
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Luc Giffon
bolsonaro
Commits
0363926f
Commit
0363926f
authored
5 years ago
by
Charly Lamothe
Browse files
Options
Downloads
Patches
Plain Diff
Add wo_weights and similarity in stage5 loss plot
parent
46a4a8b0
No related branches found
No related tags found
2 merge requests
!20
Resolve "integration-sota"
,
!19
WIP: Resolve "Adding new datasets"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/compute_results.py
+15
-5
15 additions, 5 deletions
code/compute_results.py
with
15 additions
and
5 deletions
code/compute_results.py
+
15
−
5
View file @
0363926f
...
...
@@ -420,26 +420,36 @@ if __name__ == "__main__":
omp_with_params_train_scores
,
omp_with_params_dev_scores
,
omp_with_params_test_scores
,
_
,
\
omp_with_params_experiment_score_metric
=
extract_scores_across_seeds_and_extracted_forest_sizes
(
args
.
models_dir
,
args
.
results_dir
,
args
.
experiment_ids
[
2
])
# omp_with_params
#omp_with_params_without_weights
logger
.
info
(
'
Loading omp_with_params experiment scores...
'
)
omp_with_params_without_weights_train_scores
,
omp_with_params_without_weights_dev_scores
,
omp_with_params_without_weights_test_scores
,
_
,
\
omp_with_params_experiment_score_metric
=
extract_scores_across_seeds_and_extracted_forest_sizes
(
args
.
models_dir
,
args
.
results_dir
,
args
.
experiment_ids
[
2
],
weights
=
False
)
# kmeans_with_params
logger
.
info
(
'
Loading kmeans_with_params experiment scores...
'
)
kmeans_with_params_train_scores
,
kmeans_with_params_dev_scores
,
kmeans_with_params_test_scores
,
_
,
\
kmeans_with_params_experiment_score_metric
=
extract_scores_across_seeds_and_extracted_forest_sizes
(
args
.
models_dir
,
args
.
results_dir
,
args
.
experiment_ids
[
3
])
# similarity_with_params
logger
.
info
(
'
Loading similarity_with_params experiment scores...
'
)
similarity_with_params_train_scores
,
similarity_with_params_dev_scores
,
similarity_with_params_test_scores
,
_
,
\
similarity_with_params_experiment_score_metric
=
extract_scores_across_seeds_and_extracted_forest_sizes
(
args
.
models_dir
,
args
.
results_dir
,
args
.
experiment_ids
[
4
])
# Sanity check on the metrics retreived
if
not
(
base_with_params_experiment_score_metric
==
random_with_params_experiment_score_metric
==
omp_with_params_experiment_score_metric
==
kmeans_with_params_experiment_score_metric
):
raise
ValueError
(
'
Score metrics of all experiments must be the same.
'
)
experiments_score_metric
=
base_with_params_experiment_score_metric
output_path
=
os
.
path
.
join
(
args
.
results_dir
,
args
.
dataset_name
,
'
stage5
_kmeans
'
)
output_path
=
os
.
path
.
join
(
args
.
results_dir
,
args
.
dataset_name
,
'
stage5
'
)
pathlib
.
Path
(
output_path
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
Plotter
.
plot_stage2_losses
(
file_path
=
output_path
+
os
.
sep
+
'
losses.png
'
,
all_experiment_scores
=
[
base_with_params_test_scores
,
random_with_params_test_scores
,
omp_with_params_test_scores
,
kmeans
_with_params_test_scores
],
all_labels
=
[
'
base
'
,
'
random
'
,
'
omp
'
,
'
kmeans
'
],
omp_with_params_without_weights_test_scores
,
kmeans_with_params_test_scores
,
similarity
_with_params_test_scores
],
all_labels
=
[
'
base
'
,
'
random
'
,
'
omp
'
,
'
omp_without_weights
'
,
'
kmeans
'
,
'
similarity
'
],
x_value
=
with_params_extracted_forest_sizes
,
xlabel
=
'
Number of trees extracted
'
,
ylabel
=
experiments_score_metric
,
...
...
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