alkzar90 commited on
Commit
9e06d30
1 Parent(s): 0833d64

Fix .np by .jnp

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -23,8 +23,8 @@ cost_function = st.sidebar.radio('What cost function you want to use for the fit
23
  # Generate random data
24
  X = np.column_stack((jnp.ones(number_of_observations),
25
  jax.random.uniform(key, shape=(number_of_observations,), minval=0., maxval=1.))
26
- w = np.array([3.0, -20.0, 32.0]) # coefficients
27
- X = np.column_stack((X, X[:,1] ** 2)) # add x**2 column
28
  additional_noise = 8 * jax.random.bernoulli(key, p=0.08, shape=[number_of_observations,])
29
  y = jnp.dot(X, w) + noise_standard_deviation * jax.random.normal(key, shape=[number_of_observations,]) \
30
  + additional_noise
 
23
  # Generate random data
24
  X = np.column_stack((jnp.ones(number_of_observations),
25
  jax.random.uniform(key, shape=(number_of_observations,), minval=0., maxval=1.))
26
+ w = jnp.array([3.0, -20.0, 32.0]) # coefficients
27
+ X = jnp.column_stack((X, X[:,1] ** 2)) # add x**2 column
28
  additional_noise = 8 * jax.random.bernoulli(key, p=0.08, shape=[number_of_observations,])
29
  y = jnp.dot(X, w) + noise_standard_deviation * jax.random.normal(key, shape=[number_of_observations,]) \
30
  + additional_noise