Skip to content
Snippets Groups Projects
Commit d72d7898 authored by valentin.emiya's avatar valentin.emiya
Browse files

Merge branch 'master' of gitlab.lis-lab.fr:skmad-suite/tff2020 into py

parents 79a95064 834a4ecd
Branches py
Tags
No related merge requests found
Pipeline #6377 canceled
......@@ -27,7 +27,9 @@ pages:
- pip3 install --no-deps .
- python3 tffpy/tests/ci_config.py
- python3 setup.py build_sphinx
- cp -r build/sphinx/html ../public
- cd ..
- cp -r python/build/sphinx/html public
- ls public
artifacts:
paths:
- public
......
......@@ -25,7 +25,7 @@ For additional details, see doc/install.rst.
Usage
-----
See the `documentation <http://skmad-suite.pages.lis-lab.fr/tffpy/>`_.
See the `documentation <http://skmad-suite.pages.lis-lab.fr/tff2020/>`_.
Bugs
----
......
......@@ -8,4 +8,4 @@
# __all__ = ['GaborMultiplier', 'get_dgt_params', 'get_signal_params', 'dgt']
# TODO minimal documentation__version__ = "0.1"
__version__ = "0.1.3"
__version__ = "0.1.4"
......@@ -275,7 +275,8 @@ class SolveTffExperiment(Experiment):
self.fig_dir.mkdir(parents=True, exist_ok=True)
print('Figures saved in {}'.format(self.fig_dir))
results = self.load_results(array_type='xarray')
results = results.squeeze()
results_std = results.std('solver_rand_state').squeeze()
results = results.mean('solver_rand_state').squeeze()
coords_dict = results.to_dict()['coords']
csv_path = self.fig_dir / 'exp_solve_pd.csv'
results.to_series().to_csv(csv_path, header=True)
......@@ -325,12 +326,24 @@ class SolveTffExperiment(Experiment):
x = x.reshape(-1)
y = y.reshape(-1)
I = np.logical_and(x!=0, y!=0)
x, y = x[I], y[I]
slope, intercept, r_value, p_value, std_err = linregress(x, y)
print('Running times (all): slope={}, intercept={}, 1/slope={}, '
.format(slope, intercept, 1 / slope))
'r_value={}, p_value={}, std_err={}'
.format(slope, intercept, 1 / slope, r_value, p_value, std_err))
print('Linear slope (not affine):')
print(np.vdot(x, y) / np.vdot(x, x), np.vdot(x, x) / np.vdot(x, y))
log_x, log_y = np.log10(x), np.log10(y)
slope, intercept, r_value, p_value, std_err = linregress(log_x, log_y)
print('Running times (all-log): slope={}, intercept={}, 1/slope={},'
'r_value={}, p_value={}, std_err={}'
.format(slope, intercept, 1 / slope, r_value, p_value, std_err))
print('Linear slope (not affine) - log:')
print(np.vdot(log_x, log_y) / np.vdot(log_x, log_x),
np.vdot(log_x, log_x) / np.vdot(log_x, log_y))
# plt.plot(x, slope * x + intercept)
plt.xlabel(r'Running time for TFF-1 (s)')
plt.ylabel(r'Running time for TFF-P (s)')
......
......@@ -119,12 +119,12 @@ if __name__ == '__main__':
'/data1/home/valentin.emiya/data_exp/SolveTffExperiment/'
print('Run:')
print(' '.join(['rsync', '-rv',
'valentin.emiya@frontend.lidil.univ-mrs.fr:'
'valentin.emiya@sms-ext.lis-lab.fr:'
+ from_dir,
to_dir]))
print('Or (less files):')
print(' '.join(['rsync', '-rv',
'valentin.emiya@frontend.lidil.univ-mrs.fr:'
'valentin.emiya@sms-ext.lis-lab.fr:'
+ from_dir
+ '*.*',
to_dir]))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment