diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b8a44d3d9e64160d1690c133b91543081a4b6e16..a46013758d2b9a4311b732f9c2e79f08c650e0fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/python/README.rst b/python/README.rst index 34b57eab918308e95567143bee4ee89221cd9c1d..970af7b11c62b3ecc1589aaf342b24f66e7286d5 100755 --- a/python/README.rst +++ b/python/README.rst @@ -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 ---- diff --git a/python/tffpy/__init__.py b/python/tffpy/__init__.py index 76ef20e1ba0c156ceb3b24c160254a76342a36a6..6929c0d3c2d2e5f32fb72674a579bb2b6511add5 100755 --- a/python/tffpy/__init__.py +++ b/python/tffpy/__init__.py @@ -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" diff --git a/python/tffpy/experiments/exp_solve_tff.py b/python/tffpy/experiments/exp_solve_tff.py index 94bab7509ec5da550bbc3c4b315ccefa95df8c52..ccb934aa2e6c999a49f62c1d4180b6752723752d 100644 --- a/python/tffpy/experiments/exp_solve_tff.py +++ b/python/tffpy/experiments/exp_solve_tff.py @@ -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)) + print('Running times (all): 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)') diff --git a/python/tffpy/scripts/script_exp_solve_tff.py b/python/tffpy/scripts/script_exp_solve_tff.py index e3a573eb88956038dc570e6d6295e1168c6a69b4..6d86bf72805d426c95fb5e4bc0b355f5f2b54826 100644 --- a/python/tffpy/scripts/script_exp_solve_tff.py +++ b/python/tffpy/scripts/script_exp_solve_tff.py @@ -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]))