I ran the following code
from sklearn.datasets import fetch_20newsgroups
and it took a couple of minutes the first time with the message:
Downloading 20news dataset. This may take a few minutes.
Downloading dataset from https://ndownloader.figshare.com/files/5975967 (14 MB)
The next time it was instantaneous , so python has obviously pulled the dataset to my laptop. Is this like a csv file? Where is it stored? And how do I save it into a specific folder so that i dont have to download it again when say I restart my machine
If not specified, downloaded data by fetch_20newsgroups is stored in '~/scikit_learn_data' subfolders by default.
data_home : optional, default: None
Specify a download and cache folder for the datasets. If None, all scikit-learn data is stored in '~/scikit_learn_data' subfolders.
You can change it by setting up data_home parameter:
dataset = fetch_20newsgroups(data_home=<Another Directory>)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With