Module Expr Str Import alias Import alias Import alias Assign NameStore NameLoad ImportFrom alias Import alias ImportFrom alias alias TryExcept body ImportFrom alias identifier handlers ExceptHandler type NameLoad body TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str ImportFrom alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body TryExcept body ImportFrom alias identifier handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num keyword Str keyword Str Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore BinOpSub NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad keyword Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad keyword Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Slice NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad ExtSlice Slice Slice NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Assign NameStore BinOpSub NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Slice AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Slice NameLoad If AttributeLoad NameLoad attr body AugAssignDiv NameStore Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Slice NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignMult NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Slice AttributeLoad NameLoad attr attr If NameLoad body Assign NameStore BinOpAdd NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert BoolOpAnd CompareIsNot AttributeLoad NameLoad attr NameLoad CompareGt AttributeLoad NameLoad attr Num Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore CompareGt BinOpDiv NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assert Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore BinOpAdd Num Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Index Num attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise Call NameLoad BinOpAdd Str Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults Num kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr For NameStore Call NameLoad Num NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad NameLoad BinOpAdd NameLoad NameLoad Assign NameStore BinOpSub Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice NameLoad NameLoad Slice attr AttributeLoad NameLoad attr Assert CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Num BinOpSub NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assert CompareEq AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad AugAssignAdd NameStore NameLoad AugAssignDiv NameStore NameLoad Expr Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword TupleLoad BinOpSub NameLoad AttributeLoad NameLoad attr BinOpSub NameLoad Num Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad ExtSlice Slice Slice Num Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assert Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Num ExtSlice Index Num Slice Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Slice AttributeLoad NameLoad attr Assign NameStore BinOpSub NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Slice AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignDiv NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call Call NameLoad Str keyword AttributeLoad AttributeLoad NameLoad attr attr Return Call AttributeLoad NameLoad attr ListLoad NameLoad Call NameLoad NameLoad keyword NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults Num kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr BinOpMult Str Num For NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body If CompareEq BinOpMod BinOpAdd NameLoad Num BinOpDiv SubscriptLoad AttributeLoad NameLoad attr Index Num Num Num body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Index NameLoad Slice Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Return TupleLoad SubscriptLoad NameLoad Slice Num SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Slice Num decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad For NameStore Call NameLoad Num NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpSub SubscriptLoad NameLoad ExtSlice Slice NameLoad BinOpAdd NameLoad AttributeLoad NameLoad attr Slice NameLoad AugAssignAdd NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Return BinOpDiv NameLoad Call NameLoad BinOpSub NameLoad Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr Call NameLoad NameLoad orelse Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return TupleLoad SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad ExtSlice Slice Slice Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Return TupleLoad BinOpPow NameLoad Num AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore AttributeLoad Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr TupleLoad NameLoad NameLoad attr Assign NameStore BinOpSub NameLoad NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call NameLoad BinOpDiv Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num keyword AttributeLoad NameLoad attr Return TupleLoad SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad ExtSlice Slice Slice Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Slice AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignDiv NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call Call NameLoad Str keyword AttributeLoad AttributeLoad NameLoad attr attr Return Call AttributeLoad NameLoad attr ListLoad NameLoad Call NameLoad NameLoad keyword NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num Num Num NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assert CompareEq Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AugAssignAdd AttributeStore NameLoad attr Num Assign NameStore BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad AugAssignMult AttributeStore NameLoad attr AttributeLoad NameLoad attr AugAssignAdd AttributeStore NameLoad attr NameLoad Assign NameStore BinOpDiv BinOpSub Num Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpSub Num AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body AugAssignSub SubscriptStore AttributeLoad NameLoad attr Index NameLoad BinOpDiv AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr BinOpMult Num BinOpAdd AttributeLoad NameLoad attr Num AugAssignMult SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr ExtSlice Slice BinOpAdd NameLoad Num Index NameLoad Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice BinOpAdd NameLoad Num Slice Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Index NameLoad Slice attr Assign SubscriptStore AttributeLoad NameLoad attr ExtSlice Index NameLoad Slice NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice NameLoad Index NameLoad attr AugAssignAdd AttributeStore NameLoad attr Num If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call NameLoad BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body AugAssignAdd SubscriptStore AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Slice UnaryOpUSub AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr BinOpMult Num BinOpAdd AttributeLoad NameLoad attr Num Assign NameStore BinOpDiv Num BinOpMult NameLoad NameLoad AugAssignMult AttributeStore NameLoad attr BinOpDiv Num NameLoad AugAssignMult AttributeStore NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr ExtSlice Slice AttributeLoad NameLoad attr Slice AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Index BinOpAdd UnaryOpUSub AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpDiv BinOpSub Num Call NameLoad AttributeLoad NameLoad attr BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpSub Num AttributeLoad NameLoad attr Assign NameStore BinOpDiv SubscriptLoad AttributeLoad NameLoad attr Slice UnaryOpUSub AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad BinOpDiv SubscriptLoad AttributeLoad NameLoad attr Index BinOpAdd UnaryOpUSub AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index BinOpAdd UnaryOpUSub AttributeLoad NameLoad attr NameLoad SubscriptLoad AttributeLoad NameLoad attr Index BinOpAdd UnaryOpUSub AttributeLoad NameLoad attr NameLoad Return ListLoad NameLoad NameLoad decorator_list decorator_list If CompareEq NameLoad Str body Expr Str Import alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword NameLoad keyword ListLoad Str Str Str Str Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword ListLoad Str Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Num keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Num keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword NameLoad keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Dict Str AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameStore Call NameLoad Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr keyword NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call NameLoad Lambda arguments args NameParam defaults AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Assign NameStore Dict Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore NameLoad Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr orelse Raise Call NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call NameLoad AttributeLoad NameLoad attr ListLoad NameLoad NameLoad
N/A N/A 
.. todo::

    WRITEME
 N/A logging N/A sys N/A numpy N/A N numpy theano.compat.six.moves xrange N/A warnings scipy linalg sparse N/A N/A scipy.sparse.linalg eigsh eigen_symmetric N/A N/A N/A ImportError N/A N/A N/A scipy.sparse.linalg eigen_symmetric N/A N/A N/A ImportError N/A N/A N/A scipy.sparse.linalg.eigen.arpack eigen_symmetric N/A N/A N/A ImportError N/A N/A N/A N/A warnings warn Cannot import any kind of symmetric eigen decomposition function from scipy.sparse.linalg scipy.sparse.csr csr_matrix N/A theano theano tensor theano.sparse SparseType structured_dot scipy linalg scipy.sparse.csr csr_matrix N/A N/A scipy.sparse.linalg eigen_symmetric N/A N/A N/A ImportError N/A N/A N/A scipy.sparse.linalg eigsh eigen_symmetric N/A N/A N/A ImportError N/A N/A N/A N/A warnings warn couldn't import eigsh / eigen_symmetric from scipy.linalg.sparse, some of your pca functions may randomly fail later N/A N/A N/A warnings warn the fact that somebody is using this doesn't bode well since it's unlikely that the covariance matrix is sparse pylearn2.blocks Block pylearn2.utils sharedX N/A logger N/A N/A logging getLogger _PCABase N/A Block N/A N/A 
    Block which transforms its input via Principal Component Analysis.

    This class is not intended to be instantiated directly. Use a subclass to
    select a particular PCA implementation.

    Parameters
    ----------
    num_components : int, optional
        This many components will be preserved, in decreasing order of variance
        (default None keeps all)
    min_variance : float, optional
        Components with normalized variance [0-1] below this threshold will be
        discarded
    whiten : bool, optional
        Whether or not to divide projected features by their standard deviation
     __init__ N/A N/A self num_components min_variance whiten N/A None 0.0 False N/A N/A N/A N/A N/A super _PCABase self __init__ N/A N/A self num_components num_components N/A N/A self min_variance min_variance N/A N/A self whiten whiten N/A N/A self W None N/A N/A self v None N/A N/A self mean None N/A N/A self component_cutoff N/A N/A theano shared N/A N/A theano _asarray 0 dtype int64 name component_cutoff N/A N/A self _params N/A N/A train N/A N/A self X mean N/A None N/A N/A 
        Compute the PCA transformation matrix.

        Given a rectangular matrix :math:`X = USV` such that :math:`S` is a
        diagonal matrix with :math:`X`'s singular values along its diagonal,
        returns :math:`W = V^{-1}`.

        If mean is provided, :math:`X` will not be centered first.

        Parameters
        ----------
        X : numpy.ndarray
            Matrix of shape (n, d) on which to train PCA
        mean : numpy.ndarray, optional
            Feature means of shape (d,)
         N/A N/A N/A self num_components None N/A N/A N/A self num_components N/A N/A X shape N/A 1 N/A N/A mean None N/A N/A mean N/A N/A X mean axis 0 N/A X N/A X mean N/A N/A v W N/A N/A self _cov_eigen X N/A N/A self W N/A sharedX W name W N/A N/A self v N/A sharedX v name v N/A N/A self mean N/A sharedX mean name mean N/A N/A N/A self _update_cutoff N/A component_cutoff N/A N/A N/A self component_cutoff get_value borrow True N/A N/A N/A N/A self v set_value N/A N/A N/A N/A self v get_value borrow True N/A component_cutoff N/A N/A N/A N/A self W set_value N/A N/A N/A N/A self W get_value borrow True N/A N/A N/A component_cutoff N/A __call__ N/A N/A self inputs N/A N/A N/A 
        Compute and return the PCA transformation of the current data.

        Parameters
        ----------
        inputs : numpy.ndarray
            Matrix of shape (n, d) on which to compute PCA

        Returns
        -------
        WRITEME
         N/A N/A N/A self _update_cutoff N/A normalized_mean N/A inputs N/A self mean N/A N/A normalized_mean name normalized_mean N/A W N/A N/A self W N/A N/A N/A N/A self component_cutoff N/A N/A self whiten N/A N/A W N/A W N/A N/A tensor sqrt N/A N/A self v N/A N/A self component_cutoff N/A Y N/A N/A tensor dot normalized_mean W N/A Y N/A get_weights N/A N/A self N/A N/A N/A 
        Compute and return the matrix one should multiply with to get the
        PCA/whitened data

        Returns
        -------
        WRITEME
         N/A N/A N/A self _update_cutoff N/A component_cutoff N/A N/A N/A self component_cutoff get_value N/A W N/A N/A N/A self W get_value borrow False N/A W N/A W N/A N/A N/A component_cutoff N/A N/A self whiten N/A N/A W N/A N/A N sqrt N/A N/A N/A N/A self v get_value borrow False N/A component_cutoff N/A W N/A reconstruct N/A N/A self inputs add_mean N/A True N/A N/A 
        Given a PCA transformation of the current data, compute and return
        the reconstruction of the original input

        Parameters
        ----------
        inputs : WRITEME
        add_mean : bool, optional
            WRITEME

        Returns
        -------
        WRITEME
         N/A N/A N/A self _update_cutoff N/A N/A self whiten N/A N/A inputs N/A N/A tensor sqrt N/A N/A self v N/A N/A self component_cutoff N/A X N/A N/A tensor dot inputs N/A N/A N/A self W N/A N/A N/A N/A self component_cutoff T N/A add_mean N/A N/A X N/A X N/A self mean N/A X N/A _update_cutoff N/A N/A self N/A N/A N/A 
        Update component cutoff shared var, based on current parameters.
         N/A N/A N/A N/A self num_components None N/A N/A self num_components 0 Number of components requested must be >= 1 N/A v N/A N/A N/A self v get_value borrow True N/A var_mask N/A N/A v N/A N/A v sum N/A self min_variance N/A N/A N/A numpy any var_mask No components exceed the given min. variance N/A var_cutoff N/A 1 N/A N/A N/A N/A N/A numpy where var_mask N/A 0 max N/A N/A N/A N/A self component_cutoff set_value N/A min var_cutoff N/A self num_components N/A _cov_eigen N/A N/A self X N/A N/A N/A 
        Compute and return eigen{values,vectors} of X's covariance matrix.

        Parameters
        ----------
        X : WRITEME

        Returns
        -------
        All eigenvalues in decreasing order matrix containing corresponding
        eigenvectors in its columns
         N/A N/A NotImplementedError N/A Not implemented in _PCABase. Use a  subclass (and implement it there). N/A N/A SparseMatPCA N/A _PCABase N/A N/A 
    Does PCA on sparse  matrices. Does not do online PCA. This is for the case
    where `X - X.mean()` does not fit in memory (because it's dense) but
    `N.dot((X-X.mean()).T, X-X.mean())` does.

    Parameters
    ----------
    batch_size : WRITEME
    kwargs : dict
        WRITEME
     __init__ N/A N/A self batch_size N/A 50 kwargs N/A N/A N/A N/A N/A super SparseMatPCA self __init__ kwargs N/A N/A self minibatch_size batch_size N/A get_input_type N/A N/A self N/A N/A N/A 
        .. todo::

            WRITEME
         N/A csr_matrix N/A _cov_eigen N/A N/A self X N/A N/A N/A 
        .. todo::

            WRITEME
         N/A N/A n d N/A X shape N/A cov N/A N/A numpy zeros N/A d d N/A batch_size N/A self minibatch_size N/A i N/A xrange 0 n batch_size N/A N/A N/A N/A logger info N/A N/A 	processing example {0} format i N/A end N/A min n N/A i batch_size N/A x N/A N/A N/A N/A X N/A N/A i end N/A todense N/A self mean_ N/A N/A N/A N/A x shape N/A 0 N/A end i N/A prod N/A N/A numpy dot N/A x T x N/A N/A N/A prod shape N/A d d N/A cov prod N/A cov n N/A N/A N/A logger info computing eigens N/A N/A v W N/A N/A linalg eigh cov eigvals N/A N/A d N/A self num_components N/A d 1 N/A N/A v W N/A N/A v N/A -1 N/A W N/A N/A N/A -1 N/A N/A v W N/A train N/A N/A self X N/A N/A N/A 
        Compute the PCA transformation matrix.

        Given a rectangular matrix :math:`X = USV` such that :math:`S` is a
        diagonal matrix with :math:`X`'s singular values along its diagonal,
        returns :math:`W = V^{-1}`.

        If mean is provided, :math:`X` will not be centered first.

        Parameters
        ----------
        X : numpy.ndarray
            Matrix of shape (n, d) on which to train PCA
         N/A N/A N/A sparse issparse X N/A N/A N/A logger info computing mean N/A N/A self mean_ N/A N/A N/A numpy asarray N/A N/A X mean axis 0 N/A N/A 0 N/A N/A N/A N/A N/A super SparseMatPCA self train X mean N/A self mean_ N/A __call__ N/A N/A self inputs N/A N/A N/A 
        .. todo::

            WRITEME
         N/A N/A N/A self _update_cutoff N/A Y N/A structured_dot inputs N/A N/A self W N/A N/A N/A N/A self component_cutoff N/A Z N/A Y N/A N/A tensor dot N/A self mean N/A N/A self W N/A N/A N/A N/A self component_cutoff N/A N/A self whiten N/A N/A Z N/A N/A tensor sqrt N/A N/A self v N/A N/A self component_cutoff N/A Z N/A function N/A N/A self name N/A None N/A N/A 
        Returns a compiled theano function to compute a representation

        Parameters
        ----------
        name : str
            WRITEME
         N/A inputs N/A N/A SparseType csr dtype N/A N/A theano config floatX N/A N/A N/A theano function N/A inputs N/A self inputs name name N/A N/A OnlinePCA N/A _PCABase N/A N/A 
    Online PCA implementation.

    Parameters
    ----------
    minibatch_size : WRITEME
     __init__ N/A N/A self minibatch_size N/A 500 kwargs N/A N/A N/A N/A N/A super OnlinePCA self __init__ kwargs N/A N/A self minibatch_size minibatch_size N/A _cov_eigen N/A N/A self X N/A N/A N/A 
        Perform online computation of covariance matrix eigen{values,vectors}.

        Parameters
        ----------
        X : WRITEME

        Returns
        -------
        WRITEME
         N/A num_components N/A min N/A self num_components N/A N/A X shape N/A 1 N/A pca_estimator N/A PcaOnlineEstimator N/A N/A X shape N/A 1 n_eigen num_components minibatch_size N/A self minibatch_size centering False N/A N/A N/A logger debug N/A * 50 N/A i N/A range N/A N/A X shape N/A 0 N/A N/A N/A N/A N/A i 1 N/A N/A N/A X shape N/A 0 50 0 N/A N/A N/A N/A logger debug | N/A N/A N/A pca_estimator observe N/A X N/A N/A i N/A N/A N/A v W N/A N/A pca_estimator getLeadingEigen N/A N/A N/A v N/A -1 N/A N/A W T N/A N/A N/A -1 N/A N/A Cov N/A N/A N/A 
    Covariance estimator

    It computes the covariance in small batches instead of with one
    huge matrix multiply, in order to prevent memory problems. Its call
    method has the same functionality as `numpy.cov`.

    Parameters
    ----------
    batch_size : WRITEME
     __init__ N/A N/A self batch_size N/A N/A N/A N/A self batch_size batch_size N/A __call__ N/A N/A self X N/A N/A N/A 
        .. todo::

            WRITEME
         N/A X N/A X T N/A N/A m n N/A X shape N/A mean N/A N/A X mean axis 0 N/A rval N/A N/A N zeros N/A n n N/A i N/A xrange 0 m N/A self batch_size N/A N/A B N/A N/A X N/A N/A i N/A i N/A self batch_size N/A mean N/A rval N/A N/A N dot N/A B T B N/A N/A rval N/A float N/A m 1 N/A N/A CovEigPCA N/A _PCABase N/A N/A 
    .. todo::

        WRITEME

    Parameters
    ----------
    cov_batch_size : WRITEME
     __init__ N/A N/A self cov_batch_size N/A None kwargs N/A N/A N/A N/A N/A super CovEigPCA self __init__ kwargs N/A N/A cov_batch_size None N/A N/A N/A self cov N/A Cov cov_batch_size N/A N/A N/A self cov N/A numpy cov N/A _cov_eigen N/A N/A self X N/A N/A N/A 
        Perform direct computation of covariance matrix eigen{values,vectors}.

        Parameters
        ----------
        X : WRITEME

        Returns
        -------
        WRITEME
         N/A N/A v W N/A N/A linalg eigh N/A N/A self cov N/A X T N/A N/A N/A v N/A -1 N/A W N/A N/A N/A -1 N/A N/A SVDPCA N/A _PCABase N/A N/A 
    .. todo::

        WRITEME
     _cov_eigen N/A N/A self X N/A N/A N/A 
        Compute covariance matrix eigen{values,vectors} via Singular Value
        Decomposition (SVD).

        Parameters
        ----------
        X : WRITEME

        Returns
        -------
        WRITEME
         N/A N/A U s Vh N/A N/A linalg svd X full_matrices False N/A N/A N/A s 2 N/A Vh T N/A N/A SparsePCA N/A _PCABase N/A N/A 
    .. todo::

        WRITEME
     train N/A N/A self X mean N/A None N/A N/A 
        .. todo::

            WRITEME
         N/A N/A N/A warnings warn You should probably be using SparseMatPCA, unless your design matrix fits in memory. N/A N/A n d N/A X shape N/A mean N/A N/A X mean axis 0 N/A mean_matrix N/A N/A csr_matrix N/A N/A N/A N/A mean repeat n reshape N/A d n T N/A X N/A X mean_matrix N/A N/A N/A N/A super SparsePCA self train X mean N/A N/A N/A N/A numpy asarray mean squeeze N/A _cov_eigen N/A N/A self X N/A N/A N/A 
        Perform direct computation of covariance matrix eigen{values,vectors},
        given a scipy.sparse matrix.

        Parameters
        ----------
        X : WRITEME

        Returns
        -------
        WRITEME
         N/A N/A v W N/A eigen_symmetric N/A N/A N/A N/A X T dot X N/A N/A X shape N/A 0 k N/A self num_components N/A N/A N/A v N/A -1 N/A W N/A N/A N/A -1 N/A __call__ N/A N/A self inputs N/A N/A N/A 
        Compute and return the PCA transformation of sparse data.

        Precondition: `self.mean` has been subtracted from inputs. The reason
        for this is that, as far as I can tell, there is no way to subtract a
        vector from a sparse matrix without constructing an intermediary dense
        matrix, in theano; even the hack used in `train()` won't do, because
        there is no way to symbolically construct a sparse matrix by repeating
        a vector (again, as far as I can tell).

        Parameters
        ----------
        inputs : scipy.sparse matrix object
            Sparse matrix of shape (n, d) on which to compute PCA

        Returns
        -------
        WRITEME
         N/A N/A N/A self _update_cutoff N/A Y N/A structured_dot inputs N/A N/A self W N/A N/A N/A N/A self component_cutoff N/A N/A self whiten N/A N/A Y N/A N/A tensor sqrt N/A N/A self v N/A N/A self component_cutoff N/A Y N/A function N/A N/A self name N/A None N/A N/A 
        Returns a compiled theano function to compute a representation

        Parameters
        ----------
        name : str
            WRITEME

        Returns
        -------
        WRITEME
         N/A inputs N/A N/A SparseType csr dtype N/A N/A theano config floatX N/A N/A N/A theano function N/A inputs N/A self inputs name name N/A N/A PcaOnlineEstimator N/A object N/A N/A 
    Online estimation of the leading eigen values/vectors of the covariance of
    some samples.

    Maintains a moving (with discount) low rank (n_eigen) estimate of the
    covariance matrix of some observations. New observations are accumulated
    until the batch is complete, at which point the low rank estimate is
    reevaluated.

    Example:

      pca_esti =               pca_online_estimator.PcaOnlineEstimator(dimension_of_the_samples)

      for i in range(number_of_samples):
        pca_esti.observe(samples[i])

      [eigvals, eigvecs] = pca_esti.getLeadingEigen()

    Parameters
    ----------
    n_dim : WRITEME
    n_eigen : WRITEME
    minibatch_size : WRITEME
    gamma : WRITEME
    regularizer : WRITEME
    centering : WRITEME
     __init__ N/A N/A self n_dim n_eigen minibatch_size gamma regularizer centering N/A 10 25 0.999 1e-06 True N/A N/A N/A self n_dim n_dim N/A N/A self n_eigen n_eigen N/A N/A self minibatch_size minibatch_size N/A N/A self gamma gamma N/A N/A self regularizer regularizer N/A N/A self centering centering N/A N/A self n_observations 0 N/A N/A self minibatch_index 0 N/A N/A self Xt N/A N/A numpy zeros N/A N/A N/A self n_eigen N/A self minibatch_size N/A self n_dim N/A N/A self x_sum N/A N/A numpy zeros N/A N/A self n_dim N/A N/A self G N/A N/A numpy zeros N/A N/A N/A self n_eigen N/A self minibatch_size N/A N/A self n_eigen N/A self minibatch_size N/A i N/A range N/A self n_eigen N/A N/A N/A N/A self G N/A N/A i i N/A self regularizer N/A N/A self d N/A N/A numpy zeros N/A N/A N/A self n_eigen N/A self minibatch_size N/A N/A self V N/A N/A numpy zeros N/A N/A N/A self n_eigen N/A self minibatch_size N/A N/A self n_eigen N/A self minibatch_size N/A N/A self Ut N/A N/A numpy zeros N/A N/A self n_eigen N/A self n_dim N/A observe N/A N/A self x N/A N/A N/A 
        .. todo::

            WRITEME
         N/A N/A N/A N/A numpy size x N/A self n_dim N/A N/A self n_observations 1 N/A row N/A N/A self n_eigen N/A self minibatch_index N/A N/A N/A self Xt N/A row x N/A N/A self x_sum N/A self gamma N/A N/A self x_sum x N/A normalizer N/A N/A 1.0 N/A pow N/A self gamma N/A self n_observations N/A 1.0 N/A self gamma N/A N/A self centering N/A N/A N/A N/A self Xt N/A row N/A N/A self x_sum normalizer N/A rn N/A pow N/A self gamma N/A -0.5 N/A N/A self minibatch_index 1 N/A N/A N/A self Xt N/A row rn N/A N/A N/A self G N/A N/A N/A row 1 N/A row N/A N/A numpy dot N/A N/A self Xt N/A N/A N/A row 1 N/A N/A N/A N/A N/A self Xt N/A N/A row N/A transpose N/A N/A N/A self G N/A N/A row N/A row N/A N/A N/A N/A self G N/A N/A row N/A row transpose N/A N/A self minibatch_index 1 N/A N/A N/A self minibatch_index N/A self minibatch_size N/A N/A N/A N/A self reevaluate N/A reevaluate N/A N/A self N/A N/A N/A 
        .. todo::

            WRITEME
         N/A N/A N/A self minibatch_index N/A self minibatch_size N/A i N/A range N/A N/A self n_eigen N/A self minibatch_size N/A N/A N/A N/A self G N/A N/A i i N/A self regularizer N/A N/A N/A self d N/A self V N/A N/A linalg eigh N/A self G N/A N/A self Ut N/A N/A numpy dot N/A N/A N/A N/A self V N/A N/A N/A N/A N/A self n_eigen transpose N/A self Xt N/A rn N/A pow N/A self gamma N/A -0.5 N/A N/A self minibatch_index 1 N/A inv_rn2 N/A 1.0 N/A rn rn N/A N/A self Ut N/A 1.0 rn N/A N/A self d inv_rn2 N/A N/A N/A self Xt N/A N/A N/A self n_eigen N/A N/A self Ut N/A i N/A range N/A self n_eigen N/A N/A N/A N/A self G N/A N/A i i N/A N/A self d N/A N/A N/A N/A self n_eigen i N/A N/A self minibatch_index 0 N/A getLeadingEigen N/A N/A self N/A N/A N/A 
        .. todo::

            WRITEME
         N/A normalizer N/A N/A 1.0 N/A pow N/A self gamma N/A N/A self n_observations N/A self minibatch_index N/A 1.0 N/A self gamma N/A eigvals N/A N/A N/A self d N/A N/A N/A self n_eigen normalizer N/A eigvecs N/A N/A numpy zeros N/A N/A self n_eigen N/A self n_dim N/A i N/A range N/A self n_eigen N/A N/A N/A eigvecs N/A i N/A N/A N/A self Ut N/A N/A N/A N/A self n_eigen i N/A N/A numpy sqrt N/A N/A numpy dot N/A N/A self Ut N/A N/A N/A N/A self n_eigen i N/A N/A self Ut N/A N/A N/A N/A self n_eigen i N/A N/A eigvals eigvecs N/A N/A N/A N/A __name__ __main__ N/A N/A 
    Load a dataset; compute a PCA transformation matrix from the training
    subset and pickle it (or load a previously computed one); apply said
    transformation to the test and valid subsets.
     N/A argparse pylearn2.utils load_data N/A parser N/A N/A argparse ArgumentParser description Transform the output of a model by Principal Component Analysis N/A N/A N/A parser add_argument dataset action store type str choices N/A avicenna harry rita sylvester ule help Dataset on which to compute and apply the PCA N/A N/A N/A parser add_argument -i --load-file action store type str default None required False help File containing precomputed PCA (if any) N/A N/A N/A parser add_argument -o --save-file action store type str default model-pca.pkl required False help File where the PCA pickle will be saved N/A N/A N/A parser add_argument -a --algorithm action store type str choices N/A cov_eig svd online default cov_eig required False help Which algorithm to use to compute the PCA N/A N/A N/A parser add_argument -m --minibatch-size action store type int default 500 required False help Size of minibatches used in online algorithm N/A N/A N/A parser add_argument -n --num-components action store type int default None required False help This many most components will be preserved N/A N/A N/A parser add_argument -v --min-variance action store type float default 0.0 required False help Components with variance below this threshold will be discarded N/A N/A N/A parser add_argument -w --whiten action store_const default False const True required False help Divide projected features by their standard deviation N/A args N/A N/A parser parse_args N/A data N/A load_data N/A dataset N/A args dataset N/A N/A train_data valid_data test_data N/A map N/A N/A N/A x N/A N/A N/A x get_value borrow True data N/A N/A N/A logger info N/A N/A Dataset shapes: {0} format N/A map N/A N/A N/A x N/A N/A N/A N/A x get_value shape data N/A conf N/A num_components min_variance whiten N/A args num_components N/A args min_variance N/A args whiten N/A N/A N/A args algorithm cov_eig N/A N/A PCAImpl CovEigPCA N/A N/A N/A N/A args algorithm svd N/A N/A PCAImpl SVDPCA N/A N/A N/A N/A args algorithm online N/A N/A PCAImpl OnlinePCA N/A N/A conf N/A minibatch_size N/A args minibatch_size N/A N/A N/A NotImplementedError N/A args algorithm N/A N/A args load_file N/A N/A pca N/A N/A Block load N/A args load_file N/A N/A N/A N/A logger info ... computing PCA N/A pca N/A PCAImpl conf N/A N/A N/A pca train train_data N/A N/A N/A pca save N/A args save_file N/A inputs N/A N/A tensor matrix N/A pca_transform N/A N/A theano function N/A inputs N/A pca inputs N/A valid_pca N/A pca_transform valid_data N/A test_pca N/A pca_transform test_data N/A N/A N/A logger info N/A N/A New shapes: {0} format N/A map N/A numpy shape N/A valid_pca test_pca