Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -50,37 +50,37 @@ st.write(f"### Y = \u03B1 + \u03B2X + \u03C3")
|
|
50 |
alpha_prior_option = st.selectbox("Choose an option for alpha prior:", ["Normal", "Laplace", "Cauchy"])
|
51 |
if alpha_prior_option == "Normal":
|
52 |
alpha_loc = st.slider("Select a mean value for alpha", -10.0, 10.0, 0.0, 0.1)
|
53 |
-
alpha_scale = st.slider("Select a standard deviation value for alpha", 0.
|
54 |
alpha_prior = dist.Normal(alpha_loc, alpha_scale)
|
55 |
elif alpha_prior_option == "Laplace":
|
56 |
alpha_loc = st.slider("Select a mean value for alpha", -10.0, 10.0, 0.0, 0.1)
|
57 |
-
alpha_scale = st.slider("Select a scale value for alpha", 0.
|
58 |
alpha_prior = dist.Laplace(alpha_loc, alpha_scale)
|
59 |
elif alpha_prior_option == "Cauchy":
|
60 |
alpha_loc = st.slider("Select a location value for alpha", -10.0, 10.0, 0.0, 0.1)
|
61 |
-
alpha_scale = st.slider("Select a scale value for alpha", 0.
|
62 |
alpha_prior = dist.Cauchy(alpha_loc, alpha_scale)
|
63 |
|
64 |
beta_prior_option = st.selectbox("Choose an option for beta prior:", ["Normal", "Laplace", "Cauchy"])
|
65 |
if beta_prior_option == "Normal":
|
66 |
beta_loc = st.slider("Select a mean value for beta", -10.0, 10.0, 0.0, 0.1)
|
67 |
-
beta_scale = st.slider("Select a standard deviation value for beta", 0.
|
68 |
beta_prior = dist.Normal(beta_loc, beta_scale)
|
69 |
elif beta_prior_option == "Laplace":
|
70 |
beta_loc = st.slider("Select a mean value for beta", -10.0, 10.0, 0.0, 0.1)
|
71 |
-
beta_scale = st.slider("Select a scale value for beta", 0.
|
72 |
beta_prior = dist.Laplace(beta_loc, beta_scale)
|
73 |
elif beta_prior_option == "Cauchy":
|
74 |
beta_loc = st.slider("Select a location value for beta", -10.0, 10.0, 0.0, 0.1)
|
75 |
-
beta_scale = st.slider("Select a scale value for beta", 0.
|
76 |
beta_prior = dist.Cauchy(beta_loc, beta_scale)
|
77 |
|
78 |
sigma_prior_option = st.selectbox("Choose an option for sigma prior:", ["HalfNormal", "HalfCauchy"])
|
79 |
if sigma_prior_option == "HalfNormal":
|
80 |
-
sigma_scale = st.slider("Select a scale value for sigma", 0.
|
81 |
sigma_prior = dist.HalfNormal(sigma_scale)
|
82 |
elif sigma_prior_option == "HalfCauchy":
|
83 |
-
sigma_scale = st.slider("Select a scale value for sigma", 0.
|
84 |
sigma_prior = dist.HalfCauchy(sigma_scale)
|
85 |
|
86 |
rng_key = random.PRNGKey(0)
|
|
|
50 |
alpha_prior_option = st.selectbox("Choose an option for alpha prior:", ["Normal", "Laplace", "Cauchy"])
|
51 |
if alpha_prior_option == "Normal":
|
52 |
alpha_loc = st.slider("Select a mean value for alpha", -10.0, 10.0, 0.0, 0.1)
|
53 |
+
alpha_scale = st.slider("Select a standard deviation value for alpha", 0.01, 10.0, 1.0, 0.1)
|
54 |
alpha_prior = dist.Normal(alpha_loc, alpha_scale)
|
55 |
elif alpha_prior_option == "Laplace":
|
56 |
alpha_loc = st.slider("Select a mean value for alpha", -10.0, 10.0, 0.0, 0.1)
|
57 |
+
alpha_scale = st.slider("Select a scale value for alpha", 0.01, 10.0, 1.0, 0.1)
|
58 |
alpha_prior = dist.Laplace(alpha_loc, alpha_scale)
|
59 |
elif alpha_prior_option == "Cauchy":
|
60 |
alpha_loc = st.slider("Select a location value for alpha", -10.0, 10.0, 0.0, 0.1)
|
61 |
+
alpha_scale = st.slider("Select a scale value for alpha", 0.01, 10.0, 1.0, 0.1)
|
62 |
alpha_prior = dist.Cauchy(alpha_loc, alpha_scale)
|
63 |
|
64 |
beta_prior_option = st.selectbox("Choose an option for beta prior:", ["Normal", "Laplace", "Cauchy"])
|
65 |
if beta_prior_option == "Normal":
|
66 |
beta_loc = st.slider("Select a mean value for beta", -10.0, 10.0, 0.0, 0.1)
|
67 |
+
beta_scale = st.slider("Select a standard deviation value for beta", 0.01, 10.0, 1.0, 0.1)
|
68 |
beta_prior = dist.Normal(beta_loc, beta_scale)
|
69 |
elif beta_prior_option == "Laplace":
|
70 |
beta_loc = st.slider("Select a mean value for beta", -10.0, 10.0, 0.0, 0.1)
|
71 |
+
beta_scale = st.slider("Select a scale value for beta", 0.01, 10.0, 1.0, 0.1)
|
72 |
beta_prior = dist.Laplace(beta_loc, beta_scale)
|
73 |
elif beta_prior_option == "Cauchy":
|
74 |
beta_loc = st.slider("Select a location value for beta", -10.0, 10.0, 0.0, 0.1)
|
75 |
+
beta_scale = st.slider("Select a scale value for beta", 0.01, 10.0, 1.0, 0.1)
|
76 |
beta_prior = dist.Cauchy(beta_loc, beta_scale)
|
77 |
|
78 |
sigma_prior_option = st.selectbox("Choose an option for sigma prior:", ["HalfNormal", "HalfCauchy"])
|
79 |
if sigma_prior_option == "HalfNormal":
|
80 |
+
sigma_scale = st.slider("Select a scale value for sigma", 0.01, 10.0, 1.0, 0.1)
|
81 |
sigma_prior = dist.HalfNormal(sigma_scale)
|
82 |
elif sigma_prior_option == "HalfCauchy":
|
83 |
+
sigma_scale = st.slider("Select a scale value for sigma", 0.01, 10.0, 1.0, 0.1)
|
84 |
sigma_prior = dist.HalfCauchy(sigma_scale)
|
85 |
|
86 |
rng_key = random.PRNGKey(0)
|