Skip to content

Commit dcb630e

Browse files
authored
Update Diabetes Ridge Regression Training.ipynb
1 parent b359f61 commit dcb630e

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

experimentation/Diabetes Ridge Regression Training.ipynb

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,19 @@
4646
" return data"
4747
]
4848
},
49+
{
50+
"cell_type": "code",
51+
"execution_count": 3,
52+
"metadata": {},
53+
"outputs": [],
54+
"source": [
55+
"# Train the model, return the model\n",
56+
"def train_model(data, args):\n",
57+
"reg_model = Ridge(**args)\n",
58+
"reg_model.fit(data[\"train\"][\"X\"], data[\"train\"][\"y\"])\n",
59+
" return reg_model"
60+
]
61+
},
4962
{
5063
"cell_type": "markdown",
5164
"metadata": {},
@@ -55,7 +68,7 @@
5568
},
5669
{
5770
"cell_type": "code",
58-
"execution_count": 3,
71+
"execution_count": 4,
5972
"metadata": {},
6073
"outputs": [],
6174
"source": [
@@ -88,10 +101,11 @@
88101
},
89102
{
90103
"cell_type": "code",
91-
"execution_count": 17,
104+
"execution_count": 3,
92105
"metadata": {},
93106
"outputs": [],
94107
"source": [
108+
"# Train the model, return the model\n",
95109
"def train_model(data, args):\n",
96110
"reg_model = Ridge(**args)\n",
97111
"reg_model.fit(data[\"train\"][\"X\"], data[\"train\"][\"y\"])\n",

0 commit comments

Comments
 (0)