alkzar90 commited on
Commit
8241a76
1 Parent(s): 3cff897

Display plot during the training loop

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -59,6 +59,7 @@ fig, ax = plt.subplots(dpi=120)
59
  ax.set_xlim((0,1))
60
  ax.set_ylim((-5,26))
61
  ax.scatter(X[:,1], y, c='#e76254' ,edgecolors='firebrick')
 
62
 
63
  if cost_function == 'RMSE-Loss':
64
 
@@ -94,8 +95,10 @@ if cost_function == 'RMSE-Loss':
94
 
95
  # add a line to the plot
96
  plt.plot(X[jnp.dot(X, w).argsort(), 1], jnp.dot(X, w).sort(), 'c--')
 
97
  # Plot the final line
98
  plt.plot(X[jnp.dot(X, w).argsort(), 1], jnp.dot(X, w).sort(), 'k-', label='Final line')
 
99
  status_text.text('Done!')
100
 
101
 
 
59
  ax.set_xlim((0,1))
60
  ax.set_ylim((-5,26))
61
  ax.scatter(X[:,1], y, c='#e76254' ,edgecolors='firebrick')
62
+ st.pyplot(fig)
63
 
64
  if cost_function == 'RMSE-Loss':
65
 
 
95
 
96
  # add a line to the plot
97
  plt.plot(X[jnp.dot(X, w).argsort(), 1], jnp.dot(X, w).sort(), 'c--')
98
+ st.pyplot(fig)
99
  # Plot the final line
100
  plt.plot(X[jnp.dot(X, w).argsort(), 1], jnp.dot(X, w).sort(), 'k-', label='Final line')
101
+ st.pyplot(fig)
102
  status_text.text('Done!')
103
 
104