Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Scikit learn Scikit learn FetchSpeciesDistributions

From Leeroopedia


Knowledge Sources
Domains Machine Learning, Ecology
Last Updated 2026-02-08 15:00 GMT

Overview

Concrete tool for fetching the species distribution dataset for geographic distribution modeling, provided by scikit-learn.

Description

The fetch_species_distributions function downloads and caches a dataset representing the geographic distribution of two species: Bradypus variegatus (Brown-throated Sloth) and Microryzomys minutus (Forest Small Rice Rat). The dataset is provided by Phillips et al. (2006) and includes coverage data along with species observation records, suitable for maximum entropy modeling of species distributions.

Usage

Use this function when working on species distribution modeling, geographic classification, or demonstrating maximum entropy methods for ecological modeling.

Code Reference

Source Location

Signature

@validate_params(...)
def fetch_species_distributions(
    *,
    data_home=None,
    download_if_missing=True,
    n_retries=3,
    delay=1.0,
):

Import

from sklearn.datasets import fetch_species_distributions

I/O Contract

Inputs

Name Type Required Description
data_home str, PathLike or None No Custom directory for caching (default None)
download_if_missing bool No If True, download data if not cached (default True)
n_retries int No Number of download retries (default 3)
delay float No Delay between retries in seconds (default 1.0)

Outputs

Name Type Description
dataset Bunch Dictionary-like object with coverages, train, test, grid coordinates, and DESCR

Usage Examples

Basic Usage

from sklearn.datasets import fetch_species_distributions

data = fetch_species_distributions()
print(type(data.coverages))  # numpy array of coverage features
print(data.train.dtype.names)  # field names of training records
print(data.test.dtype.names)   # field names of test records

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment