Spaces:
Runtime error
Runtime error
jiawei-ren
commited on
Commit
·
ebf41b0
1
Parent(s):
a36eee8
init
Browse files
app.py
CHANGED
|
@@ -202,7 +202,9 @@ class DummyDataset(Dataset):
|
|
| 202 |
|
| 203 |
def visualize(training_df, df, save_path, fast=False):
|
| 204 |
if fast:
|
| 205 |
-
|
|
|
|
|
|
|
| 206 |
plt.xlim((Y_LB - B) / K, (Y_UB - B) / K)
|
| 207 |
plt.ylim(Y_LB, Y_UB)
|
| 208 |
else:
|
|
@@ -214,7 +216,7 @@ def visualize(training_df, df, save_path, fast=False):
|
|
| 214 |
height=8,
|
| 215 |
ratio=2,
|
| 216 |
estimator=None, ci=None,
|
| 217 |
-
legend=False
|
| 218 |
)
|
| 219 |
g.ax_marg_x.remove()
|
| 220 |
g_line = sns.lineplot(data=df, x='x', y='y', hue='Method', ax=g.ax_joint, estimator=None, ci=None)
|
|
@@ -224,7 +226,7 @@ def visualize(training_df, df, save_path, fast=False):
|
|
| 224 |
plt.gca().axes.set_ylabel(r'$y$', fontsize=10)
|
| 225 |
|
| 226 |
plt.savefig(save_path, bbox_inches='tight')
|
| 227 |
-
plt.
|
| 228 |
|
| 229 |
|
| 230 |
def clean_up_logs():
|
|
|
|
| 202 |
|
| 203 |
def visualize(training_df, df, save_path, fast=False):
|
| 204 |
if fast:
|
| 205 |
+
f = plt.figure(figsize=(3, 3))
|
| 206 |
+
g = f.add_subplot(111)
|
| 207 |
+
g_line = sns.lineplot(data=df, x='x', y='y', hue='Method', ax=g, estimator=None, ci=None)
|
| 208 |
plt.xlim((Y_LB - B) / K, (Y_UB - B) / K)
|
| 209 |
plt.ylim(Y_LB, Y_UB)
|
| 210 |
else:
|
|
|
|
| 216 |
height=8,
|
| 217 |
ratio=2,
|
| 218 |
estimator=None, ci=None,
|
| 219 |
+
legend=False,
|
| 220 |
)
|
| 221 |
g.ax_marg_x.remove()
|
| 222 |
g_line = sns.lineplot(data=df, x='x', y='y', hue='Method', ax=g.ax_joint, estimator=None, ci=None)
|
|
|
|
| 226 |
plt.gca().axes.set_ylabel(r'$y$', fontsize=10)
|
| 227 |
|
| 228 |
plt.savefig(save_path, bbox_inches='tight')
|
| 229 |
+
plt.close()
|
| 230 |
|
| 231 |
|
| 232 |
def clean_up_logs():
|