mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-14 12:14:36 +01:00
Move datasets to project ageron/data to shrink this repo
This commit is contained in:
@@ -895,7 +895,6 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import urllib.request\n",
|
||||
"from sklearn.datasets import fetch_openml\n",
|
||||
"\n",
|
||||
"mnist = fetch_openml('mnist_784', as_frame=False)"
|
||||
@@ -1303,14 +1302,16 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# extra code\n",
|
||||
"# extra code – downloads the ladybug image\n",
|
||||
"\n",
|
||||
"root = \"https://raw.githubusercontent.com/ageron/handson-ml3/main/\"\n",
|
||||
"import urllib.request\n",
|
||||
"\n",
|
||||
"homl3_root = \"https://github.com/ageron/handson-ml3/raw/main/\"\n",
|
||||
"filename = \"ladybug.png\"\n",
|
||||
"filepath = IMAGES_PATH / filename\n",
|
||||
"if not filepath.is_file():\n",
|
||||
" print(\"Downloading\", filename)\n",
|
||||
" url = f\"{root}/images/unsupervised_learning/{filename}\"\n",
|
||||
" url = f\"{homl3_root}/images/unsupervised_learning/{filename}\"\n",
|
||||
" urllib.request.urlretrieve(url, filepath)"
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user