Fixed sklearn 0.24 issue for ch 5, 7, 8 and 9
parent
dad239b5a7
commit
08376eee3b
|
@ -1388,7 +1388,7 @@
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from sklearn.datasets import fetch_openml\n",
|
"from sklearn.datasets import fetch_openml\n",
|
||||||
"mnist = fetch_openml('mnist_784', version=1, cache=True)\n",
|
"mnist = fetch_openml('mnist_784', version=1, cache=True, as_frame=False)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"X = mnist[\"data\"]\n",
|
"X = mnist[\"data\"]\n",
|
||||||
"y = mnist[\"target\"].astype(np.uint8)\n",
|
"y = mnist[\"target\"].astype(np.uint8)\n",
|
||||||
|
|
|
@ -453,7 +453,7 @@
|
||||||
"source": [
|
"source": [
|
||||||
"from sklearn.datasets import fetch_openml\n",
|
"from sklearn.datasets import fetch_openml\n",
|
||||||
"\n",
|
"\n",
|
||||||
"mnist = fetch_openml('mnist_784', version=1)\n",
|
"mnist = fetch_openml('mnist_784', version=1, as_frame=False)\n",
|
||||||
"mnist.target = mnist.target.astype(np.uint8)"
|
"mnist.target = mnist.target.astype(np.uint8)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -773,7 +773,7 @@
|
||||||
"source": [
|
"source": [
|
||||||
"from sklearn.datasets import fetch_openml\n",
|
"from sklearn.datasets import fetch_openml\n",
|
||||||
"\n",
|
"\n",
|
||||||
"mnist = fetch_openml('mnist_784', version=1)\n",
|
"mnist = fetch_openml('mnist_784', version=1, as_frame=False)\n",
|
||||||
"mnist.target = mnist.target.astype(np.uint8)"
|
"mnist.target = mnist.target.astype(np.uint8)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -938,7 +938,7 @@
|
||||||
"import urllib\n",
|
"import urllib\n",
|
||||||
"from sklearn.datasets import fetch_openml\n",
|
"from sklearn.datasets import fetch_openml\n",
|
||||||
"\n",
|
"\n",
|
||||||
"mnist = fetch_openml('mnist_784', version=1)\n",
|
"mnist = fetch_openml('mnist_784', version=1, as_frame=False)\n",
|
||||||
"mnist.target = mnist.target.astype(np.int64)"
|
"mnist.target = mnist.target.astype(np.int64)"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue