From 88acd2b4b9207bf3dfc580a0988e1e150b5f2aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Thu, 1 Jun 2017 09:53:20 +0200 Subject: [PATCH] Make notebook code match book examples more closely in chapter 2 --- 02_end_to_end_machine_learning_project.ipynb | 25 +++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/02_end_to_end_machine_learning_project.ipynb b/02_end_to_end_machine_learning_project.ipynb index 5155781..d8a7110 100644 --- a/02_end_to_end_machine_learning_project.ipynb +++ b/02_end_to_end_machine_learning_project.ipynb @@ -1154,16 +1154,12 @@ }, { "cell_type": "code", - "execution_count": 69, + "execution_count": null, "metadata": { - "collapsed": false, - "deletable": true, - "editable": true + "collapsed": true }, "outputs": [], "source": [ - "from sklearn.pipeline import FeatureUnion\n", - "\n", "num_attribs = list(housing_num)\n", "cat_attribs = [\"ocean_proximity\"]\n", "\n", @@ -1177,7 +1173,20 @@ "cat_pipeline = Pipeline([\n", " ('selector', DataFrameSelector(cat_attribs)),\n", " ('label_binarizer', LabelBinarizer()),\n", - " ])\n", + " ])" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": { + "collapsed": false, + "deletable": true, + "editable": true + }, + "outputs": [], + "source": [ + "from sklearn.pipeline import FeatureUnion\n", "\n", "full_pipeline = FeatureUnion(transformer_list=[\n", " (\"num_pipeline\", num_pipeline),\n", @@ -1219,7 +1228,7 @@ "editable": true }, "source": [ - "# Prepare the data for Machine Learning algorithms" + "# Select and train a model " ] }, {