From e17f493cd57dbf6d86f75fb1ba3d640d5a2bf288 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 13 May 2020 01:20:51 +0200 Subject: [PATCH] ex-6: fix EMD typo --- ex-6/dist-plot.py | 6 +++--- ex-6/test.c | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ex-6/dist-plot.py b/ex-6/dist-plot.py index 99e707a..9d870f4 100755 --- a/ex-6/dist-plot.py +++ b/ex-6/dist-plot.py @@ -10,7 +10,7 @@ a, b, f = loadtxt(sys.stdin, unpack=True) subplot(131) title('FFT') -xlabel('EDM') +xlabel('EMD') ylabel('counts') hist(a[:n], insert(b[:n], 0, a[0]), weights=f[:n], histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b') @@ -18,7 +18,7 @@ ticklabel_format(style='sci', axis='x', scilimits=(0, 0), useMathText=True) subplot(132) title('RL') -xlabel('EDM') +xlabel('EMD') ylabel('counts') hist(a[n:2*n], insert(b[n:2*n], 0, a[n]), weights=f[n:2*n], histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b') @@ -26,7 +26,7 @@ ticklabel_format(style='sci', axis='x', scilimits=(0, 0), useMathText=True) subplot(133) title('convolution') -xlabel('EDM') +xlabel('EMD') ylabel('counts') hist(a[2*n:], insert(b[2*n:], 0, a[2*n]), weights=f[2*n:], histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b') diff --git a/ex-6/test.c b/ex-6/test.c index 85eeb93..fa09356 100644 --- a/ex-6/test.c +++ b/ex-6/test.c @@ -95,10 +95,16 @@ double *experiment( * histogram and store add each one to the respective * distance histogram. */ +<<<<<<< HEAD static double dist[3]; dist[0] = emd_between(hist, fft_clean); dist[1] = emd_between(hist, rl_clean); dist[2] = emd_between(hist, conv); +======= + pair_t dist; + dist.a = emd_between(hist, fft_clean); + dist.b = emd_between(hist, rl_clean); +>>>>>>> ex-6: fix EMD typo // free memory gsl_histogram_free(hist); @@ -170,7 +176,7 @@ int main(int argc, char **argv) { double conv_skew = gsl_stats_skew_m_sd(conv_dist, 1, opts.num_exps, conv_mean, conv_stdev); double conv_min, conv_max; gsl_stats_minmax(&conv_min, &conv_max, conv_dist, 1, opts.num_exps); - /* Create EDM distance histograms. + /* Create EMD distance histograms. * Since the distance depends wildly on the noise we can't * set a fixed range and therefore use the above values. */