Shamima commited on
Commit
1c5e06c
·
1 Parent(s): 1dcefd3

add noise and decrease train size

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -13,11 +13,11 @@ from sklearn.linear_model import Ridge
13
  from sklearn.model_selection import train_test_split
14
  np.random.seed(2)
15
 
16
- X = 2 * np.random.rand(1000, 1)
17
- y = 4 + 3 * X + np.random.rand(1000, 1)
18
 
19
  X_train, X_test, y_train, y_test = train_test_split(
20
- X, y, test_size=0.1, random_state=42)
21
 
22
  def build_model(alpha):
23
  r_reg = Ridge(alpha=alpha)
 
13
  from sklearn.model_selection import train_test_split
14
  np.random.seed(2)
15
 
16
+ X = 2 * np.random.rand(100, 1)
17
+ y = 4 + 3 * X + np.random.rand(100, 1)
18
 
19
  X_train, X_test, y_train, y_test = train_test_split(
20
+ X, y, test_size=0.6, random_state=42)
21
 
22
  def build_model(alpha):
23
  r_reg = Ridge(alpha=alpha)