Spaces:
Runtime error
Runtime error
Fix data generation code
Browse files
app.py
CHANGED
@@ -22,6 +22,9 @@ noise_standard_deviation = st.sidebar.slider('Standard deviation of the noise',
|
|
22 |
cost_function = st.sidebar.radio('What cost function you want to use for the fitting?', options=('RMSE-Loss', 'Huber-Loss'))
|
23 |
|
24 |
# Generate random data
|
|
|
|
|
|
|
25 |
X = np.column_stack((np.ones(number_of_observations),
|
26 |
np.random.random(number_of_observations)))
|
27 |
X = jnp.column_stack((X, X[:,1] ** 2)) # add x**2 column
|
|
|
22 |
cost_function = st.sidebar.radio('What cost function you want to use for the fitting?', options=('RMSE-Loss', 'Huber-Loss'))
|
23 |
|
24 |
# Generate random data
|
25 |
+
np.random.seed(2)
|
26 |
+
|
27 |
+
w = jnp.array([3.0, -20.0, 32.0]) # coefficients
|
28 |
X = np.column_stack((np.ones(number_of_observations),
|
29 |
np.random.random(number_of_observations)))
|
30 |
X = jnp.column_stack((X, X[:,1] ** 2)) # add x**2 column
|