Skip to content

Commit

Permalink
Silence gelsd warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ageron committed Jul 31, 2018
1 parent d93bcdf commit d88de57
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions 02_end_to_end_machine_learning_project.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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\")"
]
},
{
Expand Down Expand Up @@ -955,7 +955,7 @@
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x11cc26940>"
"<matplotlib.axes._subplots.AxesSubplot at 0x107ad8e10>"
]
},
"execution_count": 21,
Expand Down Expand Up @@ -1022,7 +1022,7 @@
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x11cce2860>"
"<matplotlib.axes._subplots.AxesSubplot at 0x11166b630>"
]
},
"execution_count": 24,
Expand Down Expand Up @@ -3165,14 +3165,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",
Expand Down Expand Up @@ -3377,14 +3384,6 @@
"execution_count": 80,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/ageron/.virtualenvs/ml/lib/python3.6/site-packages/sklearn/linear_model/base.py:509: RuntimeWarning: internal gelsd driver lwork query error, required iwork dimension not returned. This is likely the result of LAPACK bug 0038, fixed in LAPACK 3.2.2 (released July 21, 2010). Falling back to 'gelss' driver.\n",
" linalg.lstsq(X, y)\n"
]
},
{
"data": {
"text/plain": [
Expand Down

0 comments on commit d88de57

Please sign in to comment.