Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from sklearn.linear_model import LinearRegression, Ridge
|
|
5 |
from sklearn.preprocessing import PolynomialFeatures
|
6 |
from sklearn.metrics import mean_squared_error
|
7 |
|
8 |
-
st.
|
9 |
col1, col2 = st.columns(2)
|
10 |
|
11 |
degree = st.slider('Degree', 2, 40, 1)
|
@@ -13,10 +13,10 @@ alpha = st.slider('Lambda (Regularisation)', 0, 500, 1)
|
|
13 |
|
14 |
|
15 |
with col1:
|
16 |
-
st.
|
17 |
|
18 |
with col2:
|
19 |
-
st.
|
20 |
|
21 |
x = np.linspace(-1., 1., 100)
|
22 |
y = 4 + 3*x + 2*np.sin(x) + 2*np.random.randn(len(x))
|
|
|
5 |
from sklearn.preprocessing import PolynomialFeatures
|
6 |
from sklearn.metrics import mean_squared_error
|
7 |
|
8 |
+
st.subheader("Ridge Demo")
|
9 |
col1, col2 = st.columns(2)
|
10 |
|
11 |
degree = st.slider('Degree', 2, 40, 1)
|
|
|
13 |
|
14 |
|
15 |
with col1:
|
16 |
+
st.markdown("#### Un-regularized")
|
17 |
|
18 |
with col2:
|
19 |
+
st.markdown("#### Regularized")
|
20 |
|
21 |
x = np.linspace(-1., 1., 100)
|
22 |
y = 4 + 3*x + 2*np.sin(x) + 2*np.random.randn(len(x))
|