diff options
Diffstat (limited to 'examples/unbalanced-partial/plot_regpath.py')
-rw-r--r-- | examples/unbalanced-partial/plot_regpath.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/unbalanced-partial/plot_regpath.py b/examples/unbalanced-partial/plot_regpath.py index d1f2042..ffedc6e 100644 --- a/examples/unbalanced-partial/plot_regpath.py +++ b/examples/unbalanced-partial/plot_regpath.py @@ -27,7 +27,7 @@ import matplotlib.animation as animation #%% parameters and data generation -n = 50 # nb samples +n = 20 # nb samples mu_s = np.array([-1, -1]) cov_s = np.array([[1, 0], [0, 1]]) @@ -63,7 +63,7 @@ pl.show() # ----------------------------------------------------------- #%% -final_gamma = 1e-8 +final_gamma = 1e-6 t, t_list, g_list = ot.regpath.regularization_path(a, b, M, reg=final_gamma, semi_relaxed=False) t2, t_list2, g_list2 = ot.regpath.regularization_path(a, b, M, reg=final_gamma, @@ -111,7 +111,7 @@ pl.show() # Animation of the regpath for UOT l2 # ----------------------------------- -nv = 100 +nv = 50 g_list_v = np.logspace(-.5, -2.5, nv) pl.figure(3) @@ -144,7 +144,7 @@ def _update_plot(iv): i = 0 _update_plot(i) -ani = animation.FuncAnimation(pl.gcf(), _update_plot, nv, interval=50, repeat_delay=2000) +ani = animation.FuncAnimation(pl.gcf(), _update_plot, nv, interval=100, repeat_delay=2000) ############################################################################## @@ -183,8 +183,8 @@ pl.show() # Animation of the regpath for semi-relaxed UOT l2 # ------------------------------------------------ -nv = 100 -g_list_v = np.logspace(2.5, -2, nv) +nv = 50 +g_list_v = np.logspace(2, -2, nv) pl.figure(5) @@ -216,4 +216,4 @@ def _update_plot(iv): i = 0 _update_plot(i) -ani = animation.FuncAnimation(pl.gcf(), _update_plot, nv, interval=50, repeat_delay=2000) +ani = animation.FuncAnimation(pl.gcf(), _update_plot, nv, interval=100, repeat_delay=2000) |