Package pylearn :: Package datasets :: Module dataset
[hide private]

Module dataset

source code

The dataset-from-descriptor mechanism.

Classes [hide private]
Dataset
Functions [hide private]
 
add_dataset_factory(family, fn)
Add `fn` as the handler for descriptors whose first token is `family`.
source code
 
dataset_factory(family)
Register a function as the handler for a given kind of dataset, identified by `family`.
source code
 
make_dataset(family, **kwargs)
Return the dataset described by `descr`.
source code
Variables [hide private]
  _datasets = {}
Function Details [hide private]

add_dataset_factory(family, fn)

source code 

Add `fn` as the handler for descriptors whose first token is `family`.

:returns: None

dataset_factory(family)

source code 
Register a function as the handler for a given kind of dataset, identified by `family`.

When someone calls dataset_from_descr('kind_of_dataset option1 option2, etc.', approx=1),
then the handler registered for 'kind_of_dataset' will be called with the same arguments as
dataset_from_descr.

.. code-block:: python
    
    @dataset_factory('MNIST')
    def mnist_related_dataset(descr, **kwargs):
        ...

:returns: `dectorator`

make_dataset(family, **kwargs)

source code 

Return the dataset described by `descr`.

:param descr: a dataset identifier :type descr: str :returns: `Dataset`