Spaces:
Running
Running
Update pages/22_SimpleNoise.py
Browse files- pages/22_SimpleNoise.py +1 -1
pages/22_SimpleNoise.py
CHANGED
|
@@ -12,7 +12,7 @@ num_points = st.sidebar.slider('Number of Data Points', 100, 1000, 500, step=50)
|
|
| 12 |
# Generate data
|
| 13 |
np.random.seed(0)
|
| 14 |
x = np.linspace(0, 10, num_points)
|
| 15 |
-
y =
|
| 16 |
|
| 17 |
# Create scatter plot
|
| 18 |
fig, ax = plt.subplots()
|
|
|
|
| 12 |
# Generate data
|
| 13 |
np.random.seed(0)
|
| 14 |
x = np.linspace(0, 10, num_points)
|
| 15 |
+
y = 2 * x + 1 + noise_level * np.random.randn(num_points)
|
| 16 |
|
| 17 |
# Create scatter plot
|
| 18 |
fig, ax = plt.subplots()
|