Module Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore ListLoad Str Str Str Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Import alias Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad Num Num Num FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Assert Call NameLoad NameLoad If Call NameLoad SubscriptLoad NameLoad Index Num NameLoad body Assert CompareEq Call NameLoad Call NameLoad SubscriptLoad NameLoad Index Num Call NameLoad SubscriptLoad NameLoad Index Num Assign TupleStore NameStore NameStore NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assert CompareLtE Call NameLoad Call NameLoad GeneratorExp SubscriptLoad AttributeLoad NameLoad attr Index Num comprehension NameStore Call NameLoad NameLoad Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad SubscriptLoad Call NameLoad NameLoad Index Num attr Index Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad keyword Str Assign AttributeStore NameLoad attr Call NameLoad Str If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body If CompareIs NameLoad NameLoad body If Call NameLoad NameLoad Str body Assign NameStore AttributeLoad NameLoad attr orelse Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad orelse Assign NameStore Call NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Str NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Str NameLoad If BoolOpAnd CompareIs NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Return Call NameLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad Assert UnaryOpNot ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Raise Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list Call NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Raise Call NameLoad Expr Str decorator_list decorator_list
N/A N/A TODO: module-level docstring. N/A __authors__ Pascal Lamblin and Razvan Pascanu N/A __copyright__ Copyright 2010-2013, Universite de Montreal N/A __credits__ N/A Pascal Lamblin Razvan Pascanu Ian Goodfellow Mehdi Mirza N/A __license__ 3-clause BSD N/A __maintainer__ Pascal Lamblin N/A __email__ lamblinp@iro N/A functools N/A numpy np pylearn2.datasets.dataset Dataset pylearn2.utils wraps pylearn2.utils.iteration FiniteDatasetIterator resolve_iterator_class pylearn2.utils.data_specs is_flat_specs pylearn2.utils.rng make_np_rng pylearn2.utils contains_nan VectorSpacesDataset N/A Dataset N/A N/A 
    A class representing datasets being stored as a number of VectorSpaces.

    This can be seen as a generalization of DenseDesignMatrix where
    there can be any number of sources, not just X and possibly y.

    Parameters
    ----------
    data : ndarray, or tuple of ndarrays, containing the data.
        It is formatted as specified in `data_specs`. For instance, if
        `data_specs` is (VectorSpace(nfeat), 'features'), then `data` has to be
        a 2-d ndarray, of shape (nb examples, nfeat), that defines an unlabeled
        dataset. If `data_specs` is (CompositeSpace(Conv2DSpace(...),
        VectorSpace(1)), ('features', 'target')), then `data` has to be an
        (X, y) pair, with X being an ndarray containing images stored in the
        topological view specified by the `Conv2DSpace`, and y being a 2-D
        ndarray of width 1, containing the labels or targets for each example.
    data_specs : (space, source) pair
        space is an instance of `Space` (possibly a `CompositeSpace`),
        and `source` is a string (or tuple of strings, if `space` is a
        `CompositeSpace`), defining the format and labels associated
        to `data`.
    rng : object, optional
        A random number generator used for picking random indices into the
        design matrix when choosing minibatches.
    preprocessor: WRITEME
    fit_preprocessor: WRITEME
     N/A _default_seed N/A 17 2 946 __init__ N/A N/A self data data_specs rng preprocessor fit_preprocessor N/A None None _default_seed None False N/A N/A N/A is_flat_specs data_specs N/A N/A isinstance N/A data_specs N/A 1 tuple N/A N/A N/A N/A sorted N/A set N/A data_specs N/A 1 N/A sorted N/A data_specs N/A 1 N/A N/A space source data_specs N/A N/A isinstance data list N/A N/A data N/A tuple data N/A N/A N/A space np_validate data N/A N/A N/A len N/A set N/A N/A N/A elem shape N/A 0 N/A elem N/A list data 1 N/A N/A self data data N/A N/A self data_specs data_specs N/A N/A self num_examples N/A N/A N/A N/A list data N/A 0 shape N/A 0 N/A N/A self compress False N/A N/A self design_loc None N/A N/A self rng N/A make_np_rng rng which_method random_integers N/A N/A self _iter_mode N/A resolve_iterator_class sequential N/A preprocessor N/A N/A N/A N/A preprocessor apply self can_fit fit_preprocessor N/A N/A self preprocessor preprocessor N/A iterator N/A N/A self mode batch_size num_batches rng data_specs return_tuple N/A None None None None None False N/A N/A N/A mode None N/A N/A N/A hasattr self _iter_subset_class N/A N/A mode N/A self _iter_subset_class N/A N/A N/A ValueError N/A iteration mode not provided and no default mode set for %s N/A str self N/A N/A mode N/A resolve_iterator_class mode N/A N/A batch_size None N/A N/A batch_size N/A getattr self _iter_batch_size None N/A N/A num_batches None N/A N/A num_batches N/A getattr self _iter_num_batches None N/A N/A N/A rng None N/A mode stochastic N/A N/A rng N/A self rng N/A N/A data_specs None N/A N/A data_specs N/A self data_specs N/A N/A FiniteDatasetIterator self N/A mode N/A N/A self get_num_examples batch_size num_batches rng data_specs data_specs return_tuple return_tuple N/A N/A N/A functools wraps N/A Dataset iterator get_data_specs N/A N/A self N/A N/A N/A 
        Returns the data_specs specifying how the data is internally stored.

        This is the format the data returned by `self.get_data()` will be.
         N/A N/A self data_specs N/A get_data N/A N/A self N/A N/A N/A 
        .. todo::

            WRITEME
         N/A N/A self data N/A set_data N/A N/A self data data_specs N/A N/A N/A 
        .. todo::

            WRITEME
         N/A N/A N/A N/A data_specs N/A 0 np_validate data N/A N/A N/A N/A contains_nan X N/A X data N/A N/A NotImplementedError N/A get_source N/A N/A self name N/A N/A N/A 
        .. todo::

            WRITEME
         N/A N/A NotImplementedError N/A get_num_examples N/A N/A self N/A N/A N/A N/A self num_examples N/A N/A wraps N/A Dataset get_num_examples get_batch N/A N/A self batch_size data_specs N/A None N/A N/A 
        .. todo::

            WRITEME
         N/A N/A NotImplementedError N/A 
        try:
            idx = self.rng.randint(self.X.shape[0] - batch_size + 1)
        except ValueError:
            if batch_size > self.X.shape[0]:
                raise ValueError("Requested "+str(batch_size)+" examples"
                    "from a dataset containing only "+str(self.X.shape[0]))
            raise
        rx = self.X[idx:idx + batch_size, :]
        if include_labels:
            if self.y is None:
                return rx, None
            ry = self.y[idx:idx + batch_size]
            return rx, ry
        rx = np.cast[config.floatX](rx)
        return rx
         N/A N/A