Module Import alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad keyword Call NameLoad NameLoad keyword Call NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore Num For NameStore NameLoad body AugAssignAdd NameStore BinOpDiv Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad AugAssignAdd NameStore BinOpDiv Call AttributeLoad NameLoad attr keyword Num NameLoad Delete NameDel Assign NameStore BinOpMult NameLoad BinOpDiv Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpSub BinOpMult NameLoad BinOpDiv Call NameLoad NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list
N/A N/A numpy fuel.streams DataStream fuel.transformers Mapping fuel.schemes SequentialScheme build_mean_covariance N/A N/A dataset batch_size N/A N/A N/A Compute the mean and the covariance of a dataset.

    Parameters
    ----------
    dataset : fuel.datasets.Dataset
        Dataset whose mean and covariance is computed.
    batch_size : int
        The batch size for computing these quantities.

    Returns
    -------
    X_mean : :class:`~numpy.ndarray`, shape (dim,)
        The mean of the dataset.
    X_cov : :class:`~numpy.ndarray`, shape (dim, dim)
        The covariance matrix of the dataset.

     N/A data_stream N/A Mapping data_stream N/A DataStream dataset iteration_scheme N/A SequentialScheme examples N/A dataset num_examples batch_size batch_size mapping N/A N/A N/A x N/A N/A x N/A N/A N/A N/A dataset sources index features N/A dataset_iterator N/A N/A data_stream get_epoch_iterator N/A unnormalized_mean 0.0 N/A unnormalized_dot 0.0 N/A data dataset_iterator N/A N/A unnormalized_dot N/A N/A N/A N/A data T dot data batch_size N/A unnormalized_mean N/A N/A N/A data sum axis 0 batch_size N/A data N/A X_mean N/A unnormalized_mean N/A N/A float batch_size N/A dataset num_examples N/A X_cov N/A N/A unnormalized_dot N/A N/A float batch_size N/A dataset num_examples N/A N/A numpy outer X_mean X_mean N/A N/A X_mean X_cov N/A