Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
skmad-suite
tff2020
Commits
45b9714d
Commit
45b9714d
authored
Dec 02, 2020
by
valentin.emiya
Browse files
minor fixes
parent
e1dcfd40
Changes
4
Hide whitespace changes
Inline
Side-by-side
python/tffpy/experiments/exp_solve_tff.py
View file @
45b9714d
...
...
@@ -641,7 +641,7 @@ class SolveTffExperiment(Experiment):
plot_spectrogram
(
x
=
x_wb
,
dgt_params
=
dgt_params
,
fs
=
signal_params
[
'fs'
],
clim
=
clim
)
plt
.
title
(
'True s
ource
'
)
plt
.
title
(
'True s
ignal
'
)
plt
.
tight_layout
()
plt
.
savefig
(
fig_dir
/
'spectrogram_true_wb_source.pdf'
)
...
...
python/tffpy/experiments/exp_variance.py
View file @
45b9714d
...
...
@@ -20,12 +20,18 @@ class VarianceExperiment(SolveTffExperiment):
def
display_results
(
self
):
res
=
self
.
load_results
(
array_type
=
'xarray'
)
res
=
res
.
squeeze
()
print
(
'std(sdr_tff):'
,
float
(
res
.
sel
(
measure
=
'sdr_tff'
).
std
()))
print
(
'std(sdr_tffo):'
,
float
(
res
.
sel
(
measure
=
'sdr_tffo'
).
std
()))
print
(
'std(sdr_tffe):'
,
float
(
res
.
sel
(
measure
=
'sdr_tffe'
).
std
()))
print
(
'std(is_tff):'
,
float
(
res
.
sel
(
measure
=
'is_tff'
).
std
()))
print
(
'std(is_tffo):'
,
float
(
res
.
sel
(
measure
=
'is_tffo'
).
std
()))
print
(
'std(is_tffe):'
,
float
(
res
.
sel
(
measure
=
'is_tffe'
).
std
()))
tff_list
=
res
.
to_dict
()[
'coords'
][
'solver_tol_subregions'
][
'data'
]
for
measure
in
[
'sdr_tff'
,
'sdr_tffo'
,
'sdr_tffe'
,
'is_tff'
,
'is_tffo'
,
'is_tffe'
]:
for
solver_tol_subregions
in
tff_list
:
std_res
=
float
(
res
.
sel
(
measure
=
measure
,
solver_tol_subregions
=
solver_tol_subregions
).
std
())
if
solver_tol_subregions
is
None
:
measure_name
=
measure
+
'-1'
else
:
measure_name
=
measure
+
'-P'
print
(
'std({}): {}'
.
format
(
measure_name
,
std_res
))
def
plot_results
(
self
):
# No more need for this method
...
...
python/tffpy/scripts/script_exp_solve_tff.py
View file @
45b9714d
...
...
@@ -63,10 +63,12 @@ from tffpy.experiments.exp_solve_tff import \
try
:
experiment
=
SolveTffExperiment
.
get_experiment
(
setting
=
'full'
,
force_reset
=
False
)
except
RuntimeError
:
except
RuntimeError
as
e
:
experiment
=
None
except
FileNotFoundError
:
print
(
e
)
except
FileNotFoundError
as
e
:
experiment
=
None
print
(
e
)
if
__name__
==
'__main__'
:
answer
=
1
...
...
@@ -142,7 +144,8 @@ if __name__ == '__main__':
'win_choice'
:
'gauss 256'
,
'crop'
:
None
},
'solver_params'
:
{
'proba_arrf'
:
0.9999
,
'tolerance_arrf'
:
0.001
}}
'tolerance_arrf'
:
0.001
,
'rand_state'
:
0
}}
if
answer
==
8
:
task_params
[
'solver_params'
][
'tol_subregions'
]
=
None
elif
answer
==
9
:
...
...
python/tffpy/scripts/script_exp_variance.py
View file @
45b9714d
...
...
@@ -110,8 +110,8 @@ if __name__ == '__main__':
experiment
.
display_status
()
elif
answer
==
6
:
to_dir
=
str
(
experiment
.
xp_path
)
from_dir
=
\
'/data1/home/valentin.emiya/data_exp/SolveTffE
xperiment
/'
from_dir
=
'/data1/home/valentin.emiya/data_exp/{}/'
\
.
format
(
e
xperiment
.
name
)
print
(
'Run:'
)
print
(
' '
.
join
([
'rsync'
,
'-rv'
,
'valentin.emiya@sms-ext.lis-lab.fr:'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment