From 7fa61e932fa72075cee7032297f72270555d4053 Mon Sep 17 00:00:00 2001 From: davidenitti Date: Mon, 14 Nov 2016 18:31:08 +0100 Subject: [PATCH] Sampling tests --- Sampling/nnleastsquare.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sampling/nnleastsquare.py b/Sampling/nnleastsquare.py index 7e54321..5770a6b 100644 --- a/Sampling/nnleastsquare.py +++ b/Sampling/nnleastsquare.py @@ -86,7 +86,7 @@ def weights(X, oldX, oldW): if count % 1 == 0: - ax.plot(X_plot, normtarget(X_plot), label='normalized f(x)') + ax.plot(X_plot, normtarget(X_plot), label='normalized f(x) = optimal proposal') ax.plot(X_plot, target(X_plot), label='f(x) to integrate') pr = proposal(Centroids, W, Centroids, bandwidth) ax.scatter(X, WX / 10., s=10, marker='x', color='red', label="weight") @@ -96,7 +96,7 @@ def weights(X, oldX, oldW): ax.plot(Centroids, -0.01 - 0.1 * np.random.random(Centroids.shape[0]), '+k') ax.set_xlim(-0.01, 1.01) - ax.set_ylim(-0.2, 2.5) + ax.set_ylim(-0.2, 3) plt.draw() plt.pause(0.1) ax.clear()