Skip to content

Commit 1f140f1

Browse files
committed
boston housing sklearn 0.17 convention
1 parent 3df05b9 commit 1f140f1

File tree

1 file changed

+16
-36
lines changed

1 file changed

+16
-36
lines changed

projects/boston_housing/boston_housing.ipynb

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
{
3535
"cell_type": "code",
3636
"execution_count": null,
37-
"metadata": {
38-
"collapsed": false
39-
},
37+
"metadata": {},
4038
"outputs": [],
4139
"source": [
4240
"# Import libraries necessary for this project\n",
@@ -84,9 +82,7 @@
8482
{
8583
"cell_type": "code",
8684
"execution_count": null,
87-
"metadata": {
88-
"collapsed": false
89-
},
85+
"metadata": {},
9086
"outputs": [],
9187
"source": [
9288
"# TODO: Minimum price of the data\n",
@@ -161,9 +157,7 @@
161157
{
162158
"cell_type": "code",
163159
"execution_count": null,
164-
"metadata": {
165-
"collapsed": false
166-
},
160+
"metadata": {},
167161
"outputs": [],
168162
"source": [
169163
"# TODO: Import 'r2_score'\n",
@@ -201,9 +195,7 @@
201195
{
202196
"cell_type": "code",
203197
"execution_count": null,
204-
"metadata": {
205-
"collapsed": false
206-
},
198+
"metadata": {},
207199
"outputs": [],
208200
"source": [
209201
"# Calculate the performance of this model\n",
@@ -235,9 +227,7 @@
235227
{
236228
"cell_type": "code",
237229
"execution_count": null,
238-
"metadata": {
239-
"collapsed": false
240-
},
230+
"metadata": {},
241231
"outputs": [],
242232
"source": [
243233
"# TODO: Import 'train_test_split'\n",
@@ -289,7 +279,6 @@
289279
"cell_type": "code",
290280
"execution_count": null,
291281
"metadata": {
292-
"collapsed": false,
293282
"scrolled": false
294283
},
295284
"outputs": [],
@@ -327,9 +316,7 @@
327316
{
328317
"cell_type": "code",
329318
"execution_count": null,
330-
"metadata": {
331-
"collapsed": false
332-
},
319+
"metadata": {},
333320
"outputs": [],
334321
"source": [
335322
"vs.ModelComplexity(X_train, y_train)"
@@ -432,9 +419,7 @@
432419
{
433420
"cell_type": "code",
434421
"execution_count": null,
435-
"metadata": {
436-
"collapsed": false
437-
},
422+
"metadata": {},
438423
"outputs": [],
439424
"source": [
440425
"# TODO: Import 'make_scorer', 'DecisionTreeRegressor', and 'GridSearchCV'\n",
@@ -446,7 +431,7 @@
446431
" # Create cross-validation sets from the training data\n",
447432
" # sklearn version 0.18: ShuffleSplit(n_splits=10, test_size=0.1, train_size=None, random_state=None)\n",
448433
" # sklearn versiin 0.17: ShuffleSplit(n, n_iter=10, test_size=0.1, train_size=None, random_state=None)\n",
449-
" cv_sets = ShuffleSplit(X.shape[0], n_splits = 10, test_size = 0.20, random_state = 0)\n",
434+
" cv_sets = ShuffleSplit(X.shape[0], n_iter = 10, test_size = 0.20, random_state = 0)\n",
450435
"\n",
451436
" # TODO: Create a decision tree regressor object\n",
452437
" regressor = None\n",
@@ -489,7 +474,6 @@
489474
"cell_type": "code",
490475
"execution_count": null,
491476
"metadata": {
492-
"collapsed": false,
493477
"scrolled": true
494478
},
495479
"outputs": [],
@@ -529,9 +513,7 @@
529513
{
530514
"cell_type": "code",
531515
"execution_count": null,
532-
"metadata": {
533-
"collapsed": false
534-
},
516+
"metadata": {},
535517
"outputs": [],
536518
"source": [
537519
"# Produce a matrix for client data\n",
@@ -562,9 +544,7 @@
562544
{
563545
"cell_type": "code",
564546
"execution_count": null,
565-
"metadata": {
566-
"collapsed": false
567-
},
547+
"metadata": {},
568548
"outputs": [],
569549
"source": [
570550
"vs.PredictTrials(features, prices, fit_model, client_data)"
@@ -602,23 +582,23 @@
602582
"metadata": {
603583
"anaconda-cloud": {},
604584
"kernelspec": {
605-
"display_name": "Python 2",
585+
"display_name": "Python 3",
606586
"language": "python",
607-
"name": "python2"
587+
"name": "python3"
608588
},
609589
"language_info": {
610590
"codemirror_mode": {
611591
"name": "ipython",
612-
"version": 2
592+
"version": 3
613593
},
614594
"file_extension": ".py",
615595
"mimetype": "text/x-python",
616596
"name": "python",
617597
"nbconvert_exporter": "python",
618-
"pygments_lexer": "ipython2",
619-
"version": "2.7.12"
598+
"pygments_lexer": "ipython3",
599+
"version": "3.6.0"
620600
}
621601
},
622602
"nbformat": 4,
623-
"nbformat_minor": 0
603+
"nbformat_minor": 1
624604
}

0 commit comments

Comments
 (0)