-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExercise: Model Validation
733 lines (733 loc) · 22 KB
/
Exercise: Model Validation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
{
"cells": [
{
"cell_type": "markdown",
"id": "b7726660",
"metadata": {
"papermill": {
"duration": 0.006676,
"end_time": "2024-06-05T15:08:48.075854",
"exception": false,
"start_time": "2024-06-05T15:08:48.069178",
"status": "completed"
},
"tags": []
},
"source": [
"**This notebook is an exercise in the [Introduction to Machine Learning](https://www.kaggle.com/learn/intro-to-machine-learning) course. You can reference the tutorial at [this link](https://www.kaggle.com/dansbecker/model-validation).**\n",
"\n",
"---\n"
]
},
{
"cell_type": "markdown",
"id": "94c62542",
"metadata": {
"papermill": {
"duration": 0.005948,
"end_time": "2024-06-05T15:08:48.088468",
"exception": false,
"start_time": "2024-06-05T15:08:48.082520",
"status": "completed"
},
"tags": []
},
"source": [
"## Recap\n",
"You've built a model. In this exercise you will test how good your model is.\n",
"\n",
"Run the cell below to set up your coding environment where the previous exercise left off."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "47de1f3f",
"metadata": {
"execution": {
"iopub.execute_input": "2024-06-05T15:08:48.103125Z",
"iopub.status.busy": "2024-06-05T15:08:48.102640Z",
"iopub.status.idle": "2024-06-05T15:08:50.966980Z",
"shell.execute_reply": "2024-06-05T15:08:50.965822Z"
},
"papermill": {
"duration": 2.87489,
"end_time": "2024-06-05T15:08:50.969689",
"exception": false,
"start_time": "2024-06-05T15:08:48.094799",
"status": "completed"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"First in-sample predictions: [208500. 181500. 223500. 140000. 250000.]\n",
"Actual target values for those homes: [208500, 181500, 223500, 140000, 250000]\n",
"Setup Complete\n"
]
}
],
"source": [
"# Code you have previously used to load data\n",
"import pandas as pd\n",
"from sklearn.tree import DecisionTreeRegressor\n",
"\n",
"# Path of the file to read\n",
"iowa_file_path = '../input/home-data-for-ml-course/train.csv'\n",
"\n",
"home_data = pd.read_csv(iowa_file_path)\n",
"y = home_data.SalePrice\n",
"feature_columns = ['LotArea', 'YearBuilt', '1stFlrSF', '2ndFlrSF', 'FullBath', 'BedroomAbvGr', 'TotRmsAbvGrd']\n",
"X = home_data[feature_columns]\n",
"\n",
"# Specify Model\n",
"iowa_model = DecisionTreeRegressor()\n",
"# Fit Model\n",
"iowa_model.fit(X, y)\n",
"\n",
"print(\"First in-sample predictions:\", iowa_model.predict(X.head()))\n",
"print(\"Actual target values for those homes:\", y.head().tolist())\n",
"\n",
"# Set up code checking\n",
"from learntools.core import binder\n",
"binder.bind(globals())\n",
"from learntools.machine_learning.ex4 import *\n",
"print(\"Setup Complete\")"
]
},
{
"cell_type": "markdown",
"id": "9cae4050",
"metadata": {
"papermill": {
"duration": 0.006432,
"end_time": "2024-06-05T15:08:50.982762",
"exception": false,
"start_time": "2024-06-05T15:08:50.976330",
"status": "completed"
},
"tags": []
},
"source": [
"# Exercises\n",
"\n",
"## Step 1: Split Your Data\n",
"Use the `train_test_split` function to split up your data.\n",
"\n",
"Give it the argument `random_state=1` so the `check` functions know what to expect when verifying your code.\n",
"\n",
"Recall, your features are loaded in the DataFrame **X** and your target is loaded in **y**.\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "c04dab5f",
"metadata": {
"execution": {
"iopub.execute_input": "2024-06-05T15:08:50.997791Z",
"iopub.status.busy": "2024-06-05T15:08:50.997373Z",
"iopub.status.idle": "2024-06-05T15:08:51.099705Z",
"shell.execute_reply": "2024-06-05T15:08:51.098509Z"
},
"papermill": {
"duration": 0.113069,
"end_time": "2024-06-05T15:08:51.102401",
"exception": false,
"start_time": "2024-06-05T15:08:50.989332",
"status": "completed"
},
"tags": []
},
"outputs": [
{
"data": {
"application/javascript": [
"parent.postMessage({\"jupyterEvent\": \"custom.exercise_interaction\", \"data\": {\"outcomeType\": 1, \"valueTowardsCompletion\": 0.25, \"interactionType\": 1, \"questionType\": 2, \"questionId\": \"1_SplitData\", \"learnToolsVersion\": \"0.3.4\", \"failureMessage\": \"\", \"exceptionClass\": \"\", \"trace\": \"\"}}, \"*\")"
],
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"<span style=\"color:#33cc33\">Correct</span>"
],
"text/plain": [
"Correct"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Import the train_test_split function and uncomment\n",
"from sklearn.model_selection import train_test_split\n",
"\n",
"# fill in and uncomment\n",
"train_X, val_X, train_y, val_y = train_test_split(X, y, random_state = 1)\n",
"\n",
"# Check your answer\n",
"step_1.check()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "929f2907",
"metadata": {
"execution": {
"iopub.execute_input": "2024-06-05T15:08:51.118434Z",
"iopub.status.busy": "2024-06-05T15:08:51.117978Z",
"iopub.status.idle": "2024-06-05T15:08:51.123715Z",
"shell.execute_reply": "2024-06-05T15:08:51.122337Z"
},
"papermill": {
"duration": 0.016867,
"end_time": "2024-06-05T15:08:51.126183",
"exception": false,
"start_time": "2024-06-05T15:08:51.109316",
"status": "completed"
},
"tags": []
},
"outputs": [],
"source": [
"# The lines below will show you a hint or the solution.\n",
"# step_1.hint() \n",
"# step_1.solution()\n"
]
},
{
"cell_type": "markdown",
"id": "924f111c",
"metadata": {
"papermill": {
"duration": 0.006665,
"end_time": "2024-06-05T15:08:51.139717",
"exception": false,
"start_time": "2024-06-05T15:08:51.133052",
"status": "completed"
},
"tags": []
},
"source": [
"## Step 2: Specify and Fit the Model\n",
"\n",
"Create a `DecisionTreeRegressor` model and fit it to the relevant data.\n",
"Set `random_state` to 1 again when creating the model."
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "58e7dea2",
"metadata": {
"execution": {
"iopub.execute_input": "2024-06-05T15:08:51.155634Z",
"iopub.status.busy": "2024-06-05T15:08:51.155172Z",
"iopub.status.idle": "2024-06-05T15:08:51.186314Z",
"shell.execute_reply": "2024-06-05T15:08:51.185095Z"
},
"papermill": {
"duration": 0.043411,
"end_time": "2024-06-05T15:08:51.189879",
"exception": false,
"start_time": "2024-06-05T15:08:51.146468",
"status": "completed"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[186500. 184000. 130000. 92000. 164500. 220000. 335000. 144152. 215000.\n",
" 262000.]\n",
"[186500. 184000. 130000. 92000. 164500. 220000. 335000. 144152. 215000.\n",
" 262000.]\n"
]
},
{
"data": {
"application/javascript": [
"parent.postMessage({\"jupyterEvent\": \"custom.exercise_interaction\", \"data\": {\"outcomeType\": 1, \"valueTowardsCompletion\": 0.25, \"interactionType\": 1, \"questionType\": 2, \"questionId\": \"2_FitModelWithTrain\", \"learnToolsVersion\": \"0.3.4\", \"failureMessage\": \"\", \"exceptionClass\": \"\", \"trace\": \"\"}}, \"*\")"
],
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"<span style=\"color:#33cc33\">Correct</span>"
],
"text/plain": [
"Correct"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# You imported DecisionTreeRegressor in your last exercise\n",
"# and that code has been copied to the setup code above. So, no need to\n",
"# import it again\n",
"\n",
"# Specify the model\n",
"iowa_model = DecisionTreeRegressor(random_state=1)\n",
"\n",
"# Fit iowa_model with the training data.\n",
"iowa_model.fit(train_X, train_y)\n",
"\n",
"# Check your answer\n",
"step_2.check()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "c040cec8",
"metadata": {
"execution": {
"iopub.execute_input": "2024-06-05T15:08:51.206293Z",
"iopub.status.busy": "2024-06-05T15:08:51.205839Z",
"iopub.status.idle": "2024-06-05T15:08:51.211188Z",
"shell.execute_reply": "2024-06-05T15:08:51.210071Z"
},
"papermill": {
"duration": 0.016533,
"end_time": "2024-06-05T15:08:51.213889",
"exception": false,
"start_time": "2024-06-05T15:08:51.197356",
"status": "completed"
},
"tags": []
},
"outputs": [],
"source": [
"# step_2.hint()\n",
"# step_2.solution()"
]
},
{
"cell_type": "markdown",
"id": "7734b3e4",
"metadata": {
"papermill": {
"duration": 0.007044,
"end_time": "2024-06-05T15:08:51.228208",
"exception": false,
"start_time": "2024-06-05T15:08:51.221164",
"status": "completed"
},
"tags": []
},
"source": [
"## Step 3: Make Predictions with Validation data\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "e8cfa776",
"metadata": {
"execution": {
"iopub.execute_input": "2024-06-05T15:08:51.245023Z",
"iopub.status.busy": "2024-06-05T15:08:51.244609Z",
"iopub.status.idle": "2024-06-05T15:08:51.258193Z",
"shell.execute_reply": "2024-06-05T15:08:51.256993Z"
},
"papermill": {
"duration": 0.025127,
"end_time": "2024-06-05T15:08:51.260527",
"exception": false,
"start_time": "2024-06-05T15:08:51.235400",
"status": "completed"
},
"tags": []
},
"outputs": [
{
"data": {
"application/javascript": [
"parent.postMessage({\"jupyterEvent\": \"custom.exercise_interaction\", \"data\": {\"outcomeType\": 1, \"valueTowardsCompletion\": 0.25, \"interactionType\": 1, \"questionType\": 2, \"questionId\": \"3_ValPreds\", \"learnToolsVersion\": \"0.3.4\", \"failureMessage\": \"\", \"exceptionClass\": \"\", \"trace\": \"\"}}, \"*\")"
],
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"<span style=\"color:#33cc33\">Correct</span>"
],
"text/plain": [
"Correct"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Predict with all validation observations\n",
"val_predictions = iowa_model.predict(val_X)\n",
"\n",
"# Check your answer\n",
"step_3.check()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "2ed546eb",
"metadata": {
"execution": {
"iopub.execute_input": "2024-06-05T15:08:51.277327Z",
"iopub.status.busy": "2024-06-05T15:08:51.276886Z",
"iopub.status.idle": "2024-06-05T15:08:51.281828Z",
"shell.execute_reply": "2024-06-05T15:08:51.280623Z"
},
"papermill": {
"duration": 0.01629,
"end_time": "2024-06-05T15:08:51.284338",
"exception": false,
"start_time": "2024-06-05T15:08:51.268048",
"status": "completed"
},
"tags": []
},
"outputs": [],
"source": [
"# step_3.hint()\n",
"# step_3.solution()"
]
},
{
"cell_type": "markdown",
"id": "da6f19b6",
"metadata": {
"papermill": {
"duration": 0.00723,
"end_time": "2024-06-05T15:08:51.299146",
"exception": false,
"start_time": "2024-06-05T15:08:51.291916",
"status": "completed"
},
"tags": []
},
"source": [
"Inspect your predictions and actual values from validation data."
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "cece99a3",
"metadata": {
"execution": {
"iopub.execute_input": "2024-06-05T15:08:51.317719Z",
"iopub.status.busy": "2024-06-05T15:08:51.316878Z",
"iopub.status.idle": "2024-06-05T15:08:51.329654Z",
"shell.execute_reply": "2024-06-05T15:08:51.327964Z"
},
"papermill": {
"duration": 0.024815,
"end_time": "2024-06-05T15:08:51.332607",
"exception": false,
"start_time": "2024-06-05T15:08:51.307792",
"status": "completed"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[186500. 184000. 130000. 92000. 164500. 220000. 335000. 144152. 215000.\n",
" 262000. 180000. 121000. 175900. 210000. 248900. 131000. 100000. 149350.\n",
" 235000. 156000. 149900. 265979. 193500. 377500. 100000. 162900. 145000.\n",
" 180000. 582933. 146000. 140000. 91500. 112500. 113000. 145000. 312500.\n",
" 110000. 132000. 305000. 128000. 162900. 115000. 110000. 124000. 215200.\n",
" 180000. 79000. 192000. 282922. 235000. 132000. 325000. 80000. 237000.\n",
" 208300. 100000. 120500. 162000. 153000. 187000. 185750. 335000. 129000.\n",
" 124900. 185750. 133700. 127000. 230000. 146800. 157900. 136000. 153575.\n",
" 335000. 177500. 143000. 202500. 168500. 105000. 305900. 192000. 190000.\n",
" 140200. 134900. 128950. 213000. 108959. 149500. 190000. 175900. 160000.\n",
" 250580. 157000. 120500. 147500. 118000. 117000. 110000. 130000. 148500.\n",
" 148000. 190000. 130500. 127000. 120500. 135000. 168000. 176432. 128000.\n",
" 147000. 260000. 132000. 129500. 171000. 181134. 227875. 189000. 282922.\n",
" 94750. 185000. 194000. 159000. 279500. 290000. 135000. 299800. 165000.\n",
" 394432. 135750. 155000. 212000. 310000. 134800. 84000. 122900. 80000.\n",
" 191000. 755000. 147000. 248000. 106500. 145000. 359100. 145000. 192500.\n",
" 149000. 252000. 109000. 215000. 220000. 138500. 185000. 185000. 120500.\n",
" 181000. 173000. 335000. 67000. 149350. 67000. 156000. 119000. 110500.\n",
" 184000. 147000. 156000. 171000. 177000. 159000. 125000. 105000. 284000.\n",
" 167500. 200000. 312500. 213000. 135960. 205000. 237000. 107000. 163000.\n",
" 132500. 155835. 165500. 138500. 257000. 160000. 394617. 281213. 161000.\n",
" 127500. 88000. 139000. 89500. 132500. 134800. 335000. 248900. 155000.\n",
" 147000. 86000. 185000. 200000. 180500. 215200. 319900. 105000. 194000.\n",
" 340000. 256000. 280000. 186500. 105500. 155000. 133500. 255500. 253000.\n",
" 130000. 92900. 256000. 100000. 755000. 138500. 168500. 112000. 127000.\n",
" 109008. 197000. 245500. 171900. 162000. 128000. 173000. 132000. 118000.\n",
" 235128. 118964. 260000. 116000. 185000. 315750. 236500. 140000. 151500.\n",
" 184000. 84000. 130000. 154000. 205000. 110000. 151500. 123000. 129500.\n",
" 173900. 181500. 165500. 106500. 184900. 84500. 377500. 118500. 180000.\n",
" 190000. 208500. 181000. 98000. 157000. 151500. 84000. 139000. 100000.\n",
" 161750. 165600. 116000. 118500. 187000. 147000. 112000. 132000. 230000.\n",
" 128000. 147000. 125000. 145000. 151000. 284000. 221000. 140200. 129000.\n",
" 290000. 105000. 96500. 310000. 140000. 132000. 203000. 221000. 215200.\n",
" 214000. 139000. 91500. 148000. 155000. 115000. 180000. 165500. 223000.\n",
" 139000. 179900. 150000. 185000. 163000. 176000. 127000. 227000. 146000.\n",
" 99900. 275000. 180500. 180000. 157000. 186500. 179900. 137500. 219500.\n",
" 155000. 345000. 197000. 205000. 159000. 159434. 156000. 196000. 252678.\n",
" 255500. 213000. 150900. 143750. 139000. 260000. 189000. 213250. 207500.\n",
" 80000. 221000. 109500. 155000. 165000. 149350. 204900. 105900. 155000.\n",
" 176000. 395000. 149700. 147000. 143900. 226700. 176000. 116000. 325300.\n",
" 133750. 188500. 148500. 284000. 201800.]\n",
"258 231500\n",
"267 179500\n",
"288 122000\n",
"649 84500\n",
"1233 142000\n",
" ... \n",
"1017 187500\n",
"534 178000\n",
"1334 125000\n",
"1369 232000\n",
"628 135000\n",
"Name: SalePrice, Length: 365, dtype: int64\n"
]
}
],
"source": [
"# print the top few validation predictions\n",
"print(val_predictions)\n",
"# print the top few actual prices from validation data\n",
"print(val_y)"
]
},
{
"cell_type": "markdown",
"id": "aca89678",
"metadata": {
"papermill": {
"duration": 0.007852,
"end_time": "2024-06-05T15:08:51.348300",
"exception": false,
"start_time": "2024-06-05T15:08:51.340448",
"status": "completed"
},
"tags": []
},
"source": [
"What do you notice that is different from what you saw with in-sample predictions (which are printed after the top code cell in this page).\n",
"\n",
"Do you remember why validation predictions differ from in-sample (or training) predictions? This is an important idea from the last lesson.\n",
"\n",
"## Step 4: Calculate the Mean Absolute Error in Validation Data\n"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "72d664bc",
"metadata": {
"execution": {
"iopub.execute_input": "2024-06-05T15:08:51.365689Z",
"iopub.status.busy": "2024-06-05T15:08:51.365263Z",
"iopub.status.idle": "2024-06-05T15:08:51.376414Z",
"shell.execute_reply": "2024-06-05T15:08:51.375205Z"
},
"papermill": {
"duration": 0.0228,
"end_time": "2024-06-05T15:08:51.378938",
"exception": false,
"start_time": "2024-06-05T15:08:51.356138",
"status": "completed"
},
"tags": []
},
"outputs": [
{
"data": {
"application/javascript": [
"parent.postMessage({\"jupyterEvent\": \"custom.exercise_interaction\", \"data\": {\"outcomeType\": 1, \"valueTowardsCompletion\": 0.25, \"interactionType\": 1, \"questionType\": 1, \"questionId\": \"4_MAE\", \"learnToolsVersion\": \"0.3.4\", \"failureMessage\": \"\", \"exceptionClass\": \"\", \"trace\": \"\"}}, \"*\")"
],
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/markdown": [
"<span style=\"color:#33cc33\">Correct</span>"
],
"text/plain": [
"Correct"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from sklearn.metrics import mean_absolute_error\n",
"val_mae = mean_absolute_error(val_y, val_predictions)\n",
"\n",
"# uncomment following line to see the validation_mae\n",
"#print(val_mae)\n",
"\n",
"# Check your answer\n",
"step_4.check()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "c3b65e0d",
"metadata": {
"execution": {
"iopub.execute_input": "2024-06-05T15:08:51.397870Z",
"iopub.status.busy": "2024-06-05T15:08:51.397443Z",
"iopub.status.idle": "2024-06-05T15:08:51.402333Z",
"shell.execute_reply": "2024-06-05T15:08:51.401117Z"
},
"papermill": {
"duration": 0.016804,
"end_time": "2024-06-05T15:08:51.404791",
"exception": false,
"start_time": "2024-06-05T15:08:51.387987",
"status": "completed"
},
"tags": []
},
"outputs": [],
"source": [
"# step_4.hint()\n",
"# step_4.solution()"
]
},
{
"cell_type": "markdown",
"id": "731561ce",
"metadata": {
"papermill": {
"duration": 0.007736,
"end_time": "2024-06-05T15:08:51.420689",
"exception": false,
"start_time": "2024-06-05T15:08:51.412953",
"status": "completed"
},
"tags": []
},
"source": [
"Is that MAE good? There isn't a general rule for what values are good that applies across applications. But you'll see how to use (and improve) this number in the next step.\n",
"\n",
"# Keep Going\n",
"\n",
"You are ready for **[Underfitting and Overfitting](https://www.kaggle.com/dansbecker/underfitting-and-overfitting).**\n"
]
},
{
"cell_type": "markdown",
"id": "2b3f1111",
"metadata": {
"papermill": {
"duration": 0.007756,
"end_time": "2024-06-05T15:08:51.436619",
"exception": false,
"start_time": "2024-06-05T15:08:51.428863",
"status": "completed"
},
"tags": []
},
"source": [
"---\n",
"\n",
"\n",
"\n",
"\n",
"*Have questions or comments? Visit the [course discussion forum](https://www.kaggle.com/learn/intro-to-machine-learning/discussion) to chat with other learners.*"
]
}
],
"metadata": {
"kaggle": {
"accelerator": "none",
"dataSources": [
{
"databundleVersionId": 111096,
"sourceId": 10211,
"sourceType": "competition"
},
{
"datasetId": 11167,
"sourceId": 15520,
"sourceType": "datasetVersion"
},
{
"datasetId": 2709,
"sourceId": 38454,
"sourceType": "datasetVersion"
}
],
"isGpuEnabled": false,
"isInternetEnabled": false,
"language": "python",
"sourceType": "notebook"
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
},
"papermill": {
"default_parameters": {},
"duration": 7.237263,
"end_time": "2024-06-05T15:08:52.068022",
"environment_variables": {},
"exception": null,
"input_path": "__notebook__.ipynb",
"output_path": "__notebook__.ipynb",
"parameters": {},
"start_time": "2024-06-05T15:08:44.830759",
"version": "2.5.0"
}
},
"nbformat": 4,
"nbformat_minor": 5
}