Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tff2020
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
skmad-suite
tff2020
Commits
b554dd9d
Commit
b554dd9d
authored
5 years ago
by
valentin.emiya
Browse files
Options
Downloads
Patches
Plain Diff
fix minor bug in display results
parent
434e9b7b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/tffpy/experiments/exp_solve_tff.py
+7
-7
7 additions, 7 deletions
python/tffpy/experiments/exp_solve_tff.py
python/tffpy/scripts/script_exp_solve_tff.py
+8
-5
8 additions, 5 deletions
python/tffpy/scripts/script_exp_solve_tff.py
with
15 additions
and
12 deletions
python/tffpy/experiments/exp_solve_tff.py
+
7
−
7
View file @
b554dd9d
...
@@ -61,7 +61,7 @@ class SolveTffExperiment(Experiment):
...
@@ -61,7 +61,7 @@ class SolveTffExperiment(Experiment):
if
setting
==
'
light
'
:
if
setting
==
'
light
'
:
data_params
[
'
loc_source
'
]
=
'
bird
'
data_params
[
'
loc_source
'
]
=
'
bird
'
data_params
[
'
wideband_src
'
]
=
'
car
'
data_params
[
'
wideband_src
'
]
=
'
car
'
problem_params
[
'
win_choice
'
]
=
'
hann 128
'
problem_params
[
'
win_choice
'
]
=
[
'
gauss 64
'
,
'
hann 128
'
]
problem_params
[
'
crop
'
]
=
4096
problem_params
[
'
crop
'
]
=
4096
solver_params
[
'
tolerance_arrf
'
]
=
1e-2
solver_params
[
'
tolerance_arrf
'
]
=
1e-2
solver_params
[
'
proba_arrf
'
]
=
1
-
1e-2
solver_params
[
'
proba_arrf
'
]
=
1
-
1e-2
...
@@ -121,7 +121,7 @@ class SolveTffExperiment(Experiment):
...
@@ -121,7 +121,7 @@ class SolveTffExperiment(Experiment):
# Scatter plot for running times : tff-1 vs. tff-P
# Scatter plot for running times : tff-1 vs. tff-P
plt
.
figure
()
plt
.
figure
()
for
win_type
in
coords_dict
[
'
problem_win_choice
'
][
'
data
'
]:
for
win_type
in
coords_dict
[
'
problem_win_choice
'
][
'
data
'
]:
t_tff1
=
results
.
sel
(
measure
=
[
'
t_lambda_
est
'
,
'
t_arrf
'
,
'
t_evdn
'
],
t_tff1
=
results
.
sel
(
measure
=
[
'
t_lambda_
tff
'
,
'
t_arrf
'
,
'
t_evdn
'
],
problem_win_choice
=
win_type
,
problem_win_choice
=
win_type
,
solver_tol_subregions
=
None
)
solver_tol_subregions
=
None
)
t_tff1
=
t_tff1
.
sum
(
dim
=
'
measure
'
)
t_tff1
=
t_tff1
.
sum
(
dim
=
'
measure
'
)
...
@@ -129,7 +129,7 @@ class SolveTffExperiment(Experiment):
...
@@ -129,7 +129,7 @@ class SolveTffExperiment(Experiment):
not_none
=
coords_dict
[
'
solver_tol_subregions
'
][
'
data
'
].
copy
()
not_none
=
coords_dict
[
'
solver_tol_subregions
'
][
'
data
'
].
copy
()
not_none
.
remove
(
None
)
not_none
.
remove
(
None
)
not_none
=
not_none
[
0
]
not_none
=
not_none
[
0
]
t_tffp
=
results
.
sel
(
measure
=
[
'
t_lambda_
est
'
,
'
t_arrf
'
,
t_tffp
=
results
.
sel
(
measure
=
[
'
t_lambda_
tff
'
,
'
t_arrf
'
,
'
t_evdn
'
,
'
t_subreg
'
],
'
t_evdn
'
,
'
t_subreg
'
],
problem_win_choice
=
win_type
,
problem_win_choice
=
win_type
,
solver_tol_subregions
=
not_none
)
solver_tol_subregions
=
not_none
)
...
@@ -160,7 +160,7 @@ class SolveTffExperiment(Experiment):
...
@@ -160,7 +160,7 @@ class SolveTffExperiment(Experiment):
mask_size_tff1
=
results
.
sel
(
measure
=
[
'
mask_size
'
],
mask_size_tff1
=
results
.
sel
(
measure
=
[
'
mask_size
'
],
problem_win_choice
=
win_type
,
problem_win_choice
=
win_type
,
solver_tol_subregions
=
None
).
squeeze
()
solver_tol_subregions
=
None
).
squeeze
()
t_tff1
=
results
.
sel
(
measure
=
[
'
t_lambda_
est
'
,
'
t_arrf
'
,
'
t_evdn
'
],
t_tff1
=
results
.
sel
(
measure
=
[
'
t_lambda_
tff
'
,
'
t_arrf
'
,
'
t_evdn
'
],
problem_win_choice
=
win_type
,
problem_win_choice
=
win_type
,
solver_tol_subregions
=
None
)
solver_tol_subregions
=
None
)
t_tff1
=
t_tff1
.
sum
(
dim
=
'
measure
'
)
t_tff1
=
t_tff1
.
sum
(
dim
=
'
measure
'
)
...
@@ -176,7 +176,7 @@ class SolveTffExperiment(Experiment):
...
@@ -176,7 +176,7 @@ class SolveTffExperiment(Experiment):
measure
=
[
'
mask_size
'
],
measure
=
[
'
mask_size
'
],
problem_win_choice
=
win_type
,
problem_win_choice
=
win_type
,
solver_tol_subregions
=
not_none
).
squeeze
()
solver_tol_subregions
=
not_none
).
squeeze
()
t_tffp
=
results
.
sel
(
measure
=
[
'
t_lambda_
est
'
,
'
t_arrf
'
,
t_tffp
=
results
.
sel
(
measure
=
[
'
t_lambda_
tff
'
,
'
t_arrf
'
,
'
t_evdn
'
,
'
t_subreg
'
],
'
t_evdn
'
,
'
t_subreg
'
],
problem_win_choice
=
win_type
,
problem_win_choice
=
win_type
,
solver_tol_subregions
=
not_none
)
solver_tol_subregions
=
not_none
)
...
@@ -221,7 +221,7 @@ class SolveTffExperiment(Experiment):
...
@@ -221,7 +221,7 @@ class SolveTffExperiment(Experiment):
measure
=
'
sdr_tff
'
,
measure
=
'
sdr_tff
'
,
solver_tol_subregions
=
not_none
).
squeeze
().
values
.
reshape
(
-
1
)
solver_tol_subregions
=
not_none
).
squeeze
().
values
.
reshape
(
-
1
)
sdr_tffo
=
results
.
sel
(
sdr_tffo
=
results
.
sel
(
measure
=
'
sdr_
oracle_sdr
'
,
measure
=
'
sdr_
tffo
'
,
solver_tol_subregions
=
not_none
).
squeeze
().
values
.
reshape
(
-
1
)
solver_tol_subregions
=
not_none
).
squeeze
().
values
.
reshape
(
-
1
)
sdr_interp
=
results
.
sel
(
sdr_interp
=
results
.
sel
(
measure
=
'
sdr_interp
'
,
measure
=
'
sdr_interp
'
,
...
@@ -236,7 +236,7 @@ class SolveTffExperiment(Experiment):
...
@@ -236,7 +236,7 @@ class SolveTffExperiment(Experiment):
measure
=
'
is_tff
'
,
measure
=
'
is_tff
'
,
solver_tol_subregions
=
not_none
).
squeeze
().
values
.
reshape
(
-
1
)
solver_tol_subregions
=
not_none
).
squeeze
().
values
.
reshape
(
-
1
)
is_tffo
=
results
.
sel
(
is_tffo
=
results
.
sel
(
measure
=
'
is_
oracle_sdr
'
,
measure
=
'
is_
tffo
'
,
solver_tol_subregions
=
not_none
).
squeeze
().
values
.
reshape
(
-
1
)
solver_tol_subregions
=
not_none
).
squeeze
().
values
.
reshape
(
-
1
)
is_interp
=
results
.
sel
(
is_interp
=
results
.
sel
(
measure
=
'
is_interp
'
,
measure
=
'
is_interp
'
,
...
...
This diff is collapsed.
Click to expand it.
python/tffpy/scripts/script_exp_solve_tff.py
+
8
−
5
View file @
b554dd9d
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
.. moduleauthor:: Valentin Emiya
.. moduleauthor:: Valentin Emiya
"""
"""
from
yafe.utils
import
generate_oar_script
from
yafe.utils
import
generate_oar_script
import
matplotlib.pyplot
as
plt
from
tffpy.experiments.exp_solve_tff
import
\
from
tffpy.experiments.exp_solve_tff
import
\
SolveTffExperiment
,
create_and_run_light_experiment
SolveTffExperiment
,
create_and_run_light_experiment
...
@@ -24,8 +25,8 @@ if __name__ == '__main__':
...
@@ -24,8 +25,8 @@ if __name__ == '__main__':
'
2 - Display results of light experiment
'
,
'
2 - Display results of light experiment
'
,
'
3 - Full experiment: create full experiment
'
,
'
3 - Full experiment: create full experiment
'
,
'
4 - Generate OAR script
'
,
'
4 - Generate OAR script
'
,
'
5 - Full experiment:
download
results
'
,
'
5 - Full experiment:
collect
results
'
,
'
6 - Full experiment:
collect
results
'
,
'
6 - Full experiment:
download
results
'
,
'
7 - Full experiment: display results
'
,
'
7 - Full experiment: display results
'
,
'
8 - Figures for task 12 (bird + car, TFF-1)
'
,
'
8 - Figures for task 12 (bird + car, TFF-1)
'
,
'
9 - Figures for task 13 (bird + car, TFF-P)
'
,
'
9 - Figures for task 13 (bird + car, TFF-P)
'
,
...
@@ -41,6 +42,8 @@ if __name__ == '__main__':
...
@@ -41,6 +42,8 @@ if __name__ == '__main__':
setting
=
'
light
'
,
force_reset
=
False
)
setting
=
'
light
'
,
force_reset
=
False
)
for
idt
in
range
(
light_exp
.
n_tasks
):
for
idt
in
range
(
light_exp
.
n_tasks
):
light_exp
.
plot_task
(
idt
=
idt
,
fontsize
=
16
)
light_exp
.
plot_task
(
idt
=
idt
,
fontsize
=
16
)
plt
.
close
(
'
all
'
)
light_exp
.
plot_results
()
elif
answer
==
3
:
elif
answer
==
3
:
experiment
=
SolveTffExperiment
.
get_experiment
(
experiment
=
SolveTffExperiment
.
get_experiment
(
setting
=
'
full
'
,
force_reset
=
True
)
setting
=
'
full
'
,
force_reset
=
True
)
...
@@ -55,6 +58,9 @@ if __name__ == '__main__':
...
@@ -55,6 +58,9 @@ if __name__ == '__main__':
activate_env_command
=
'
source activate py36
'
,
activate_env_command
=
'
source activate py36
'
,
use_gpu
=
False
)
use_gpu
=
False
)
elif
answer
==
5
:
elif
answer
==
5
:
experiment
.
collect_results
()
experiment
.
display_status
()
elif
answer
==
6
:
to_dir
=
str
(
experiment
.
xp_path
)
to_dir
=
str
(
experiment
.
xp_path
)
from_dir
=
\
from_dir
=
\
'
/data1/home/valentin.emiya/data_exp/SolveTffExperiment/
'
'
/data1/home/valentin.emiya/data_exp/SolveTffExperiment/
'
...
@@ -69,9 +75,6 @@ if __name__ == '__main__':
...
@@ -69,9 +75,6 @@ if __name__ == '__main__':
+
from_dir
+
from_dir
+
'
*.*
'
,
+
'
*.*
'
,
to_dir
]))
to_dir
]))
elif
answer
==
6
:
experiment
.
collect_results
()
experiment
.
display_status
()
elif
answer
==
7
:
elif
answer
==
7
:
experiment
.
plot_results
()
experiment
.
plot_results
()
experiment
.
display_status
()
experiment
.
display_status
()
...
...
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