Spaces:
Runtime error
Runtime error
Add markdown and latex
Browse files
app.py
CHANGED
@@ -5,6 +5,9 @@ import matplotlib.pyplot as plt
|
|
5 |
st.title('Fitting simple models with JAX')
|
6 |
st.header('A quadratric regression example')
|
7 |
|
|
|
|
|
|
|
8 |
number_of_observations = st.sidebar.slider('Number of observations', min_value=50, max_value=150, value=50)
|
9 |
noise_standard_deviation = st.sidebar.slider('Standard deviation of the noise', min_value = 0.0, max_value=2.0, value=0.25)
|
10 |
|
@@ -20,7 +23,7 @@ additional_noise = 8 * np.random.binomial(1, 0.03, size = number_of_observations
|
|
20 |
y = np.dot(X, w) + noise_standard_deviation * np.random.randn(number_of_observations) \
|
21 |
+ additional_noise
|
22 |
|
23 |
-
|
24 |
fig, ax = plt.subplots(dpi=320)
|
25 |
ax.set_xlim((0,1))
|
26 |
ax.set_ylim((-5,20))
|
|
|
5 |
st.title('Fitting simple models with JAX')
|
6 |
st.header('A quadratric regression example')
|
7 |
|
8 |
+
st.markdown('**This is a simple text** to specify the goal of this simple data app\n.')
|
9 |
+
st.latex('h(\boldsymbol x, \boldsymbol w)= \sum_{k=1}^{K}\boldsymbol w_{k} \phi_{k}(\boldsymbol x)'
|
10 |
+
|
11 |
number_of_observations = st.sidebar.slider('Number of observations', min_value=50, max_value=150, value=50)
|
12 |
noise_standard_deviation = st.sidebar.slider('Standard deviation of the noise', min_value = 0.0, max_value=2.0, value=0.25)
|
13 |
|
|
|
23 |
y = np.dot(X, w) + noise_standard_deviation * np.random.randn(number_of_observations) \
|
24 |
+ additional_noise
|
25 |
|
26 |
+
|
27 |
fig, ax = plt.subplots(dpi=320)
|
28 |
ax.set_xlim((0,1))
|
29 |
ax.set_ylim((-5,20))
|