Silence gelsd warning

main
Aurélien Geron 2018-07-31 20:22:05 +01:00
parent de9f490bc3
commit 9367c6ef42
1 changed files with 10 additions and 3 deletions

View File

@ -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",