Skip to content
Snippets Groups Projects
Commit c4ff3339 authored by Shashank  Singh's avatar Shashank Singh
Browse files

Added some print statements to more transparently report progress.

parent b20de5b6
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,7 @@ def _plot_all(xs, ns=[2**12], s_gs=[1.0], d_Zs=[3], d_Xs=[3], sigma_Xs=[1.0], si
plt.errorbar(xs, _mse(oracle_errors), _ste(oracle_errors), marker='s', markersize=10, lw=2, label='Oracle')
plt.errorbar(xs, _mse(oracle_cv_errors), _ste(oracle_cv_errors), ls='--', marker='s', markersize=10, lw=2, label='Oracle CV')
# Plot performance over n
print('Generating Panel (a): performance over sample size n...')
plt.subplot(2, 3, 1)
ns = np.logspace(4, 12, 9, base=2., dtype=int)
_plot_all(ns=ns, xs=ns)
......@@ -76,21 +76,21 @@ plt.xlabel('Sample size ($n$)')
plt.ylabel('Mean Squared Error')
plt.legend()
# Plot performance over d_Z
print('Generating Panel (b): performance over intrinsic dimention d_Z...')
plt.subplot(2, 3, 2)
d_Zs = range(1, 11)
_plot_all(d_Zs=d_Zs, xs=d_Zs)
plt.gca().set_yscale('log')
plt.xlabel('Intrinsic Dimension ($d_Z$)')
# Plot performance over sigma_X
print('Generating Panel (c): performance over covariate noise level sigma_X...')
plt.subplot(2, 3, 3)
sigma_Xs = np.logspace(-1, 1, 10)
_plot_all(sigma_Xs=sigma_Xs, xs=sigma_Xs)
plt.loglog()
plt.xlabel('Covariate Noise Level ($\sigma_X$)')
# Plot performance over s_g
print('Generating Panel (d): performance over smoothness s_g of g...')
plt.subplot(2, 3, 4)
s_gs = np.linspace(0.1, 1.0, 10)
_plot_all(s_gs=s_gs, xs=s_gs)
......@@ -98,14 +98,14 @@ plt.gca().set_yscale('log')
plt.xlabel('Smoothness ($s_g$) of $g$')
plt.ylabel('Mean Squared Error')
# Plot performance over d_X
print('Generating Panel (e): performance over covariate noise dimention d_X...')
plt.subplot(2, 3, 5)
d_Xs = range(1, 11)
_plot_all(d_Xs=d_Xs, xs=d_Xs)
plt.gca().set_yscale('log')
plt.xlabel('Covariate Noise Dimension ($d_X$)')
# Plot performance over sigma_Y
print('Generating Panel (f): performance over response noise level sigma_Y...')
plt.subplot(2, 3, 6)
sigma_Ys = np.logspace(-1, 1, 10)
_plot_all(sigma_Ys=sigma_Ys, xs=sigma_Ys)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment