Skip to content

Commit ed7734c

Browse files
committed
project_3
1 parent f022cc5 commit ed7734c

3 files changed

Lines changed: 1237 additions & 8 deletions

File tree

ML_for_beginners/Project2_linear_regression/linear_regression.ipynb

Lines changed: 202 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 40,
5+
"execution_count": 2,
66
"metadata": {},
77
"outputs": [
88
{
@@ -99,7 +99,7 @@
9999
"9 4.0 3.0"
100100
]
101101
},
102-
"execution_count": 40,
102+
"execution_count": 2,
103103
"metadata": {},
104104
"output_type": "execute_result"
105105
}
@@ -124,7 +124,7 @@
124124
},
125125
{
126126
"cell_type": "code",
127-
"execution_count": 41,
127+
"execution_count": 3,
128128
"metadata": {},
129129
"outputs": [
130130
{
@@ -133,7 +133,7 @@
133133
"<AxesSubplot:xlabel='0', ylabel='1'>"
134134
]
135135
},
136-
"execution_count": 41,
136+
"execution_count": 3,
137137
"metadata": {},
138138
"output_type": "execute_result"
139139
},
@@ -156,7 +156,7 @@
156156
},
157157
{
158158
"cell_type": "code",
159-
"execution_count": null,
159+
"execution_count": 4,
160160
"metadata": {},
161161
"outputs": [],
162162
"source": [
@@ -166,7 +166,201 @@
166166
},
167167
{
168168
"cell_type": "code",
169-
"execution_count": null,
169+
"execution_count": 8,
170+
"metadata": {},
171+
"outputs": [
172+
{
173+
"data": {
174+
"text/html": [
175+
"<div>\n",
176+
"<style scoped>\n",
177+
" .dataframe tbody tr th:only-of-type {\n",
178+
" vertical-align: middle;\n",
179+
" }\n",
180+
"\n",
181+
" .dataframe tbody tr th {\n",
182+
" vertical-align: top;\n",
183+
" }\n",
184+
"\n",
185+
" .dataframe thead th {\n",
186+
" text-align: right;\n",
187+
" }\n",
188+
"</style>\n",
189+
"<table border=\"1\" class=\"dataframe\">\n",
190+
" <thead>\n",
191+
" <tr style=\"text-align: right;\">\n",
192+
" <th></th>\n",
193+
" <th>1</th>\n",
194+
" </tr>\n",
195+
" </thead>\n",
196+
" <tbody>\n",
197+
" <tr>\n",
198+
" <th>0</th>\n",
199+
" <td>1.0</td>\n",
200+
" </tr>\n",
201+
" <tr>\n",
202+
" <th>1</th>\n",
203+
" <td>1.6</td>\n",
204+
" </tr>\n",
205+
" <tr>\n",
206+
" <th>2</th>\n",
207+
" <td>2.3</td>\n",
208+
" </tr>\n",
209+
" <tr>\n",
210+
" <th>3</th>\n",
211+
" <td>2.0</td>\n",
212+
" </tr>\n",
213+
" <tr>\n",
214+
" <th>4</th>\n",
215+
" <td>2.1</td>\n",
216+
" </tr>\n",
217+
" <tr>\n",
218+
" <th>5</th>\n",
219+
" <td>2.4</td>\n",
220+
" </tr>\n",
221+
" <tr>\n",
222+
" <th>6</th>\n",
223+
" <td>2.6</td>\n",
224+
" </tr>\n",
225+
" <tr>\n",
226+
" <th>7</th>\n",
227+
" <td>2.1</td>\n",
228+
" </tr>\n",
229+
" <tr>\n",
230+
" <th>8</th>\n",
231+
" <td>2.3</td>\n",
232+
" </tr>\n",
233+
" <tr>\n",
234+
" <th>9</th>\n",
235+
" <td>3.0</td>\n",
236+
" </tr>\n",
237+
" </tbody>\n",
238+
"</table>\n",
239+
"</div>"
240+
],
241+
"text/plain": [
242+
" 1\n",
243+
"0 1.0\n",
244+
"1 1.6\n",
245+
"2 2.3\n",
246+
"3 2.0\n",
247+
"4 2.1\n",
248+
"5 2.4\n",
249+
"6 2.6\n",
250+
"7 2.1\n",
251+
"8 2.3\n",
252+
"9 3.0"
253+
]
254+
},
255+
"execution_count": 8,
256+
"metadata": {},
257+
"output_type": "execute_result"
258+
}
259+
],
260+
"source": [
261+
"y"
262+
]
263+
},
264+
{
265+
"cell_type": "code",
266+
"execution_count": 5,
267+
"metadata": {},
268+
"outputs": [
269+
{
270+
"data": {
271+
"text/html": [
272+
"<div>\n",
273+
"<style scoped>\n",
274+
" .dataframe tbody tr th:only-of-type {\n",
275+
" vertical-align: middle;\n",
276+
" }\n",
277+
"\n",
278+
" .dataframe tbody tr th {\n",
279+
" vertical-align: top;\n",
280+
" }\n",
281+
"\n",
282+
" .dataframe thead th {\n",
283+
" text-align: right;\n",
284+
" }\n",
285+
"</style>\n",
286+
"<table border=\"1\" class=\"dataframe\">\n",
287+
" <thead>\n",
288+
" <tr style=\"text-align: right;\">\n",
289+
" <th></th>\n",
290+
" <th>0</th>\n",
291+
" </tr>\n",
292+
" </thead>\n",
293+
" <tbody>\n",
294+
" <tr>\n",
295+
" <th>0</th>\n",
296+
" <td>0.0</td>\n",
297+
" </tr>\n",
298+
" <tr>\n",
299+
" <th>1</th>\n",
300+
" <td>0.5</td>\n",
301+
" </tr>\n",
302+
" <tr>\n",
303+
" <th>2</th>\n",
304+
" <td>0.8</td>\n",
305+
" </tr>\n",
306+
" <tr>\n",
307+
" <th>3</th>\n",
308+
" <td>1.2</td>\n",
309+
" </tr>\n",
310+
" <tr>\n",
311+
" <th>4</th>\n",
312+
" <td>1.4</td>\n",
313+
" </tr>\n",
314+
" <tr>\n",
315+
" <th>5</th>\n",
316+
" <td>2.1</td>\n",
317+
" </tr>\n",
318+
" <tr>\n",
319+
" <th>6</th>\n",
320+
" <td>2.4</td>\n",
321+
" </tr>\n",
322+
" <tr>\n",
323+
" <th>7</th>\n",
324+
" <td>2.6</td>\n",
325+
" </tr>\n",
326+
" <tr>\n",
327+
" <th>8</th>\n",
328+
" <td>3.4</td>\n",
329+
" </tr>\n",
330+
" <tr>\n",
331+
" <th>9</th>\n",
332+
" <td>4.0</td>\n",
333+
" </tr>\n",
334+
" </tbody>\n",
335+
"</table>\n",
336+
"</div>"
337+
],
338+
"text/plain": [
339+
" 0\n",
340+
"0 0.0\n",
341+
"1 0.5\n",
342+
"2 0.8\n",
343+
"3 1.2\n",
344+
"4 1.4\n",
345+
"5 2.1\n",
346+
"6 2.4\n",
347+
"7 2.6\n",
348+
"8 3.4\n",
349+
"9 4.0"
350+
]
351+
},
352+
"execution_count": 5,
353+
"metadata": {},
354+
"output_type": "execute_result"
355+
}
356+
],
357+
"source": [
358+
"X"
359+
]
360+
},
361+
{
362+
"cell_type": "code",
363+
"execution_count": 6,
170364
"metadata": {},
171365
"outputs": [],
172366
"source": [
@@ -177,7 +371,7 @@
177371
},
178372
{
179373
"cell_type": "code",
180-
"execution_count": 34,
374+
"execution_count": 7,
181375
"metadata": {},
182376
"outputs": [
183377
{
@@ -186,7 +380,7 @@
186380
"array([[3.23342267]])"
187381
]
188382
},
189-
"execution_count": 34,
383+
"execution_count": 7,
190384
"metadata": {},
191385
"output_type": "execute_result"
192386
}

0 commit comments

Comments
 (0)