Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
python35
/
lib64
/
python3.5
/
site-packages
/
sklearn
/
datasets
/
__pycache__
/
File Content:
species_distributions.cpython-35.pyc
��(X� � @ s d Z d d l m Z d d l m Z d d l m Z y d d l m Z d Z Wn( e k rz d d l m Z d Z Yn Xd d l Z d d l m Z m Z d d l m Z d d l m Z d Z e d Z e d Z d Z d e j d d � Z d d � Z d d � Z d d d d � Z d S)ay ============================= Species distribution dataset ============================= This dataset represents the geographic distribution of species. The dataset is provided by Phillips et. al. (2006). The two species are: - `"Bradypus variegatus" <http://www.iucnredlist.org/details/3038/0>`_ , the Brown-throated Sloth. - `"Microryzomys minutus" <http://www.iucnredlist.org/details/13408/0>`_ , also known as the Forest Small Rice Rat, a rodent that lives in Peru, Colombia, Ecuador, Peru, and Venezuela. References: * `"Maximum entropy modeling of species geographic distributions" <http://www.cs.princeton.edu/~schapire/papers/ecolmod.pdf>`_ S. J. Phillips, R. P. Anderson, R. E. Schapire - Ecological Modelling, 190:231-259, 2006. Notes: * See examples/applications/plot_species_distribution_modeling.py for an example of using this dataset � )�BytesIO)�makedirs)�exists)�urlopenTFN)� get_data_home�Bunch)� _pkl_filepath)�joblibz6http://www.cs.princeton.edu/~schapire/maxent/datasets/zsamples.zipz coverages.zipzspecies_coverage.pkz� c s� � f d d � t | � D� } d d � � t � f d d � | D� � } t j � d | �} t | d � } | d k r� d | | <| S)zjLoad a coverage file from an open file object. This will return a numpy array of the given dtype c s g | ] } � j � � q S� )�readline)�.0�i)�Fr �/species_distributions.py� <listcomp>F s z"_load_coverage.<locals>.<listcomp>c S s$ | j � d t | j � d � f S)Nr � )�split�float)�tr r r �<lambda>G s z _load_coverage.<locals>.<lambda>c s g | ] } � | � � q Sr r )r �line)� make_tupler r r H s �dtypes NODATA_valuei'