From 9367c6ef42a354d847e61073bad7c0aaf9e54096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Tue, 31 Jul 2018 20:22:05 +0100 Subject: [PATCH] Silence gelsd warning --- 02_end_to_end_machine_learning_project.ipynb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/02_end_to_end_machine_learning_project.ipynb b/02_end_to_end_machine_learning_project.ipynb index 96ff4c5..74806ab 100644 --- a/02_end_to_end_machine_learning_project.ipynb +++ b/02_end_to_end_machine_learning_project.ipynb @@ -70,7 +70,7 @@ "\n", "# Ignore useless warnings (see SciPy issue #5998)\n", "import warnings\n", - "warnings.filterwarnings(action=\"ignore\", module=\"scipy\", message=\"internal gelsd\")" + "warnings.filterwarnings(action=\"ignore\", message=\"^internal gelsd\")" ] }, { @@ -983,14 +983,21 @@ "**Warning**: earlier versions of the book applied different transformations to different columns using a solution based on a `DataFrameSelector` transformer and a `FeatureUnion` (see below). It is now preferable to use the `ColumnTransformer` class that will be introduced in Scikit-Learn 0.20. For now we import it from `future_encoders.py`, but when Scikit-Learn 0.20 is released, you can import it from `sklearn.compose` instead:" ] }, + { + "cell_type": "code", + "execution_count": 71, + "metadata": {}, + "outputs": [], + "source": [ + "from future_encoders import ColumnTransformer" + ] + }, { "cell_type": "code", "execution_count": 72, "metadata": {}, "outputs": [], "source": [ - "from future_encoders import ColumnTransformer\n", - "\n", "num_attribs = list(housing_num)\n", "cat_attribs = [\"ocean_proximity\"]\n", "\n",