Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -49,11 +49,16 @@ def run_linear_regression(X, y, alpha_prior, beta_prior, sigma_prior):
|
|
49 |
# User Input
|
50 |
st.write("# Bayesian Linear Regression")
|
51 |
|
52 |
-
st.
|
53 |
-
|
54 |
-
|
55 |
-
\textbf{
|
56 |
-
\
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
alpha_prior_option = st.selectbox("Choose an option for alpha prior:", ["Normal", "Laplace", "Cauchy"])
|
59 |
if alpha_prior_option == "Normal":
|
|
|
49 |
# User Input
|
50 |
st.write("# Bayesian Linear Regression")
|
51 |
|
52 |
+
st.markdown("""
|
53 |
+
<div style='text-align: left;'>
|
54 |
+
""" + st.latex(r'''\begin{aligned}
|
55 |
+
\textbf{Prior:} \hspace{0.5 cm} p(\alpha) &= N(\mu_0, \Sigma_0),\hspace{0.2 cm} p(\beta) = N(\mu_1, \Sigma_1),\hspace{0.2 cm} p(\sigma) = N(\mu_2, \Sigma_2)\\
|
56 |
+
\textbf{Likelihood:} \hspace{0.5 cm} p(y | X, \beta,\alpha, \sigma) &= N(X\beta + \alpha, \sigma)\\
|
57 |
+
\textbf{Posterior:} \hspace{0.5 cm} p(\alpha | X, y) &\propto p(y | X, \beta, \sigma) p(\alpha),\hspace{0.2 cm} p(\beta | X, y) \propto p(y | X, \alpha, \sigma) p(\beta),\hspace{0.2 cm} p(\sigma | X, y) \propto p(y | X, \beta, \alpha) p(\sigma)
|
58 |
+
\end{aligned}''') + """
|
59 |
+
</div>
|
60 |
+
""", unsafe_allow_html=True)
|
61 |
+
|
62 |
|
63 |
alpha_prior_option = st.selectbox("Choose an option for alpha prior:", ["Normal", "Laplace", "Cauchy"])
|
64 |
if alpha_prior_option == "Normal":
|