ex-6 compute EMD of the convolution
This commit is contained in:
parent
e17f493cd5
commit
f863d14f5f
@ -10,7 +10,7 @@ a, b, f = loadtxt(sys.stdin, unpack=True)
|
||||
|
||||
subplot(131)
|
||||
title('FFT')
|
||||
xlabel('EMD')
|
||||
xlabel('EDM')
|
||||
ylabel('counts')
|
||||
hist(a[:n], insert(b[:n], 0, a[0]), weights=f[:n],
|
||||
histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b')
|
||||
|
@ -95,16 +95,10 @@ 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);
|
||||
@ -176,7 +170,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 EMD distance histograms.
|
||||
/* Create EDM distance histograms.
|
||||
* Since the distance depends wildly on the noise we can't
|
||||
* set a fixed range and therefore use the above values.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user