ex-6: fix EMD typo

This commit is contained in:
Michele Guerini Rocco 2020-05-13 01:20:51 +02:00
parent 3119e18451
commit 1ccf3759c5
9 changed files with 6 additions and 6 deletions

View File

@ -10,7 +10,7 @@
* equally sized this can be futher simplified to give a simple
* O(n) solution.
*/
double edm_between(gsl_histogram *a, gsl_histogram *b) {
double emd_between(gsl_histogram *a, gsl_histogram *b) {
/* For the distance to make sense the
* histograms must have the same area.
*/

View File

@ -11,7 +11,7 @@
* equally sized this can be futher simplified to give a simple
* O(n) solution.
*/
double edm_between(gsl_histogram *a, gsl_histogram *b);
double emd_between(gsl_histogram *a, gsl_histogram *b);
/* Normalise a histogram: ie rescaling the bin

View File

@ -9,7 +9,7 @@ def plot(table, title='', log=False):
plt.subplot(211)
if log:
plt.xscale('log')
plt.title('EDM distance' + ' '*10, loc='right')
plt.title('EMD distance' + ' '*10, loc='right')
plt.plot(table[0], table[1], color='#92182b')
plt.tick_params(axis='y', labelcolor='#92182b')
@ -31,7 +31,7 @@ def plot(table, title='', log=False):
plt.rcParams['font.size'] = 12
table = np.loadtxt('ex-6/plots/edm-round.txt')
table = np.loadtxt('ex-6/plots/emd-round.txt')
plot(table[:27].T, title='noiseless', log=True)
plot(table[27:47].T, title=r'$\sigma=0.005$')

View File

@ -104,8 +104,8 @@ pair_t experiment(
* distance histogram.
*/
pair_t dist;
dist.a = edm_between(hist, fft_clean);
dist.b = edm_between(hist, rl_clean);
dist.a = emd_between(hist, fft_clean);
dist.b = emd_between(hist, rl_clean);
// free memory
gsl_histogram_free(hist);