alkzar90 commited on
Commit
16e4f76
1 Parent(s): 4c6f386

Add radio branches of actions

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py CHANGED
@@ -34,4 +34,21 @@ ax.set_ylim((-5,26))
34
  ax.scatter(X[:,1], y, c='#e76254' ,edgecolors='firebrick')
35
 
36
  st.pyplot(fig)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  st.write(X[:5, :])
 
34
  ax.scatter(X[:,1], y, c='#e76254' ,edgecolors='firebrick')
35
 
36
  st.pyplot(fig)
37
+
38
+ # Fitting by the respective cost_function
39
+ if cost_function == 'RMSE-Loss':
40
+ st.write('You selected the RMSE loss function.')
41
+ st.latex(r'''\ell(X, y, w)=\frac{1}{m}||Xw - y||_{2}^2''')
42
+ st.latex(r'''\ell(X, y, w)=\frac{1}{m}\big(\sqrt{(Xw - y)\cdot(Xw - y)}\big)^2''')
43
+ st.latex(r'''\ell(X, y, w)= \frac{1}{m}\sum_1^m (\hat{y}_i - y_i)^2''')
44
+ else:
45
+ st.write("You selected the Huber loss function.")
46
+ st.latex(r'''
47
+ \ell_{H} =
48
+ \begin{cases}
49
+ (y^{(i)}-\hat{y}^{(i)})^2 & \text{for }\quad |y^{(i)}-\hat{y}^{(i)}|\leq \delta \\
50
+ 2\delta|y^{(i)}-\hat{y}^{(i)}| - \delta^2 & \text{otherwise}
51
+ \end{cases}''')
52
+
53
+
54
  st.write(X[:5, :])