Commit 834a4ecd authored by valentin.emiya's avatar valentin.emiya
Browse files

update exp to multiple runs

parent 19bad0dd
Pipeline #6102 passed with stages
in 13 minutes and 47 seconds
......@@ -254,7 +254,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)
......@@ -304,12 +305,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)')
......
......@@ -118,12 +118,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]))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment