Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PARADISE
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SIG
Theses
Pierre Lotte
PARADISE
Commits
3baacb5a
Commit
3baacb5a
authored
9 months ago
by
Pierre LOTTE
Browse files
Options
Downloads
Patches
Plain Diff
Change results structure
parent
89285604
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
results/base.py
+1
-1
1 addition, 1 deletion
results/base.py
results/roc.py
+4
-8
4 additions, 8 deletions
results/roc.py
with
5 additions
and
9 deletions
results/base.py
+
1
−
1
View file @
3baacb5a
...
...
@@ -11,7 +11,7 @@ class BaseResults():
self
.
path
=
path
self
.
algos
=
algos
self
.
configs
=
config_names
self
.
result
=
{
"
roc
"
:
{},
"
f1
"
:
{}
}
self
.
result
=
{}
def
compute
(
self
,
auto_split
=
False
):
"""
...
...
This diff is collapsed.
Click to expand it.
results/roc.py
+
4
−
8
View file @
3baacb5a
...
...
@@ -38,25 +38,21 @@ class ROCResults(BaseResults):
roc
,
f1
=
self
.
__compute_score
(
labels
,
y_pred_path
)
if
algo
in
self
.
result
[
"
roc
"
]:
self
.
result
[
"
roc
"
][
algo
][
config_name
]
=
{
"
classic
"
:
round
(
roc
,
4
)}
self
.
result
[
"
f1
"
][
algo
][
config_name
]
=
{
"
classic
"
:
round
(
f1
,
4
)}
self
.
result
[
algo
][
config_name
]
=
{
"
classic
"
:
{
"
roc
"
:
round
(
roc
,
4
),
"
f1
"
:
round
(
f1
,
4
)}}
else
:
self
.
result
[
"
roc
"
][
algo
]
=
{
config_name
:
{
"
classic
"
:
round
(
roc
,
4
)}}
self
.
result
[
"
f1
"
][
algo
]
=
{
config_name
:
{
"
classic
"
:
round
(
f1
,
4
)}}
self
.
result
[
algo
]
=
{
config_name
:
{
"
classic
"
:
{
"
roc
"
:
round
(
roc
,
4
),
"
f1
"
:
round
(
f1
,
4
)}}}
# Compute results for automatically splitted dataset
if
auto_split
:
files
=
__exec
(
f
"
find -L
{
self
.
path
}
/
{
config_name
}
/results_
{
algo
}
-regex
'
^.*dataset[_0-9]+_auto_split_
{
algo
}
.ts
'"
)
roc
,
f1
=
self
.
__compute_score
(
labels
,
files
,
local
=
True
)
self
.
result
[
"
roc
"
][
algo
][
f
"
{
config_name
}
"
][
"
auto_split
"
]
=
round
(
roc
,
4
)
self
.
result
[
"
f1
"
][
algo
][
f
"
{
config_name
}
"
][
"
auto_split
"
]
=
round
(
f1
,
4
)
self
.
result
[
algo
][
f
"
{
config_name
}
"
][
"
auto_split
"
]
=
{
"
roc
"
:
round
(
roc
,
4
),
"
f1
"
:
round
(
f1
,
4
)}
# Compute results for splitted dataset
files
=
__exec
(
f
"
find -L
{
self
.
path
}
/
{
config_name
}
/results_
{
algo
}
-regex
'
^.*dataset[_0-9]+_
{
algo
}
.ts
'"
)
roc
,
f1
=
self
.
__compute_score
(
labels
,
files
,
local
=
True
)
self
.
result
[
"
roc
"
][
algo
][
f
"
{
config_name
}
"
][
"
split
"
]
=
round
(
roc
,
4
)
self
.
result
[
"
f1
"
][
algo
][
f
"
{
config_name
}
"
][
"
split
"
]
=
round
(
f1
,
4
)
self
.
result
[
algo
][
f
"
{
config_name
}
"
][
"
split
"
]
=
{
"
roc
"
:
round
(
roc
,
4
),
"
f1
"
:
round
(
f1
,
4
)}
print
(
json
.
dumps
(
self
.
result
))
...
...
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