Fork me on GitHub

sklearn.datasets.fetch_covtype

sklearn.datasets.fetch_covtype(data_home=None, download_if_missing=True, random_state=None, shuffle=False)[source]

Load the covertype dataset, downloading it if necessary.

Read more in the User Guide.

Parameters:

data_home : string, optional

Specify another download and cache folder for the datasets. By default all scikit learn data is stored in ‘~/scikit_learn_data’ subfolders.

download_if_missing : boolean, default=True

If False, raise a IOError if the data is not locally available instead of trying to download the data from the source site.

random_state : int, RandomState instance or None, optional (default=None)

Random state for shuffling the dataset. If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by np.random.

shuffle : bool, default=False

Whether to shuffle dataset.

Returns:

dataset : dict-like object with the following attributes:

dataset.data : numpy array of shape (581012, 54)

Each row corresponds to the 54 features in the dataset.

dataset.target : numpy array of shape (581012,)

Each value corresponds to one of the 7 forest covertypes with values ranging between 1 to 7.

dataset.DESCR : string

Description of the forest covertype dataset.

Previous