Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

where is scikit dataset stored on computer?

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

like image 272
Alhpa Delta Avatar asked May 31 '26 01:05

Alhpa Delta


1 Answers

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>)
like image 60
Amine Benatmane Avatar answered Jun 01 '26 19:06

Amine Benatmane