
    0Phl                        d Z ddlmZmZ ddlmZmZ ddlZddl	m
Z
 ddlmZ ddlmZ ddlmZ d	d
lmZ d	dlmZ d	dlmZ d	dlmZmZ d	dlmZmZmZ d	dlmZm Z m!Z!m"Z" d	dl#m$Z$m%Z% d	dl&m'Z'm(Z( ddl)m*Z* d Z+d Z, G d de*          Z-dS )zPrincipal Component Analysis.    )logsqrt)IntegralRealN)linalg)issparse)svds)gammaln   )_fit_context)check_random_state)_init_arpack_v0)_convert_to_numpyget_namespace)Interval
RealNotInt
StrOptions)fast_logdetrandomized_svdstable_cumsumsvd_flip)_implicit_column_offsetmean_variance_axis)check_is_fittedvalidate_data   )_BasePCAc           
      p   t          |           \  }}| j        d         }d|cxk    r|k     sn t          d          d}| |dz
           |k     r|j         S | t	          d          z  }t          d|dz             D ]>}|t          ||z
  dz   dz            t	          |j                  ||z
  dz   z  dz  z
  z  }?|                    |                    | d|                             }	|	 |z  dz  }	t          ||                    | |d                   ||z
  z            }
t	          |
           |z  ||z
  z  dz  }||z  ||dz   z  dz  z
  }t	          d|j        z            ||z   z  dz  }d}|
                    | d	
          }|
|||<   t          |          D ]l}t          |dz   | j        d                   D ]K}|t	          | |         | |         z
  d||         z  d||         z  z
  z            t	          |          z   z  }Lm||	z   |z   |z   |dz  z
  |t	          |          z  dz  z
  }|S )aj  Compute the log-likelihood of a rank ``rank`` dataset.

    The dataset is assumed to be embedded in gaussian noise of shape(n,
    dimf) having spectrum ``spectrum``. This implements the method of
    T. P. Minka.

    Parameters
    ----------
    spectrum : ndarray of shape (n_features,)
        Data spectrum.
    rank : int
        Tested rank value. It should be strictly lower than n_features,
        otherwise the method isn't specified (division by zero in equation
        (31) from the paper).
    n_samples : int
        Number of samples.

    Returns
    -------
    ll : float
        The log-likelihood.

    References
    ----------
    This implements the method of `Thomas P. Minka:
    Automatic Choice of Dimensionality for PCA. NIPS 2000: 598-604
    <https://proceedings.neurips.cc/paper/2000/file/7503cfacd12053d309b6bed5c89de212-Paper.pdf>`_
    r   r   z0the tested rank should be in [1, n_features - 1]gV瞯<       @N      ?        Tcopy)r   shape
ValueErrorinfr   ranger
   pisummaxasarray)spectrumrank	n_samplesxp_
n_featuresepspuiplvpvmpppa	spectrum_jlls                     Z/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/sklearn/decomposition/_pca.py_assess_dimensionr?      s   : (##EB"J!!!!z!!!!KLLL
CqC w
S	B1dQh 
 

Z!^a'3.//"%jjJNQ./#56	

 
x''	(	(B
y3	BC((J,=>??A
a&&9	
T 1	2S	8BTDD3J/#55A	S25[		QX	&	,B	B

8$
//I!"Id:o4[[  q1uhnQ/00 	 	A#!x{*sYq\/AC)TU,DV/VW I BB	
 
b2	R#X	%s9~~(=(C	CBI    c                     t          |           \  }}|                    |           }|j         |d<   t          d| j        d                   D ]}t          | ||          ||<   |                    |          S )zuInfers the dimension of a dataset with a given spectrum.

    The returned value will be in [1, n_features - 1].
    r   r   )r   
empty_liker&   r'   r$   r?   argmax)r,   r.   r/   r0   r=   r-   s         r>   _infer_dimensionrD   e   s|    
 (##EB	x	 	 BVGBqEa*++ @ @$XtY??499R==r@   c                       e Zd ZU dZ eeddd           eeddd           edh          dgd	gd	g eh d
          g eeddd          g edh           eeddd          g eeddd          g eh d          gdgd	Z	e
ed<   	 dddddddddddZ ed          dd            Z ed          dd            Zd Zd Zd Zd ZddZ fdZ xZS ) PCAaB+  Principal component analysis (PCA).

    Linear dimensionality reduction using Singular Value Decomposition of the
    data to project it to a lower dimensional space. The input data is centered
    but not scaled for each feature before applying the SVD.

    It uses the LAPACK implementation of the full SVD or a randomized truncated
    SVD by the method of Halko et al. 2009, depending on the shape of the input
    data and the number of components to extract.

    With sparse inputs, the ARPACK implementation of the truncated SVD can be
    used (i.e. through :func:`scipy.sparse.linalg.svds`). Alternatively, one
    may consider :class:`TruncatedSVD` where the data are not centered.

    Notice that this class only supports sparse inputs for some solvers such as
    "arpack" and "covariance_eigh". See :class:`TruncatedSVD` for an
    alternative with sparse data.

    For a usage example, see
    :ref:`sphx_glr_auto_examples_decomposition_plot_pca_iris.py`

    Read more in the :ref:`User Guide <PCA>`.

    Parameters
    ----------
    n_components : int, float or 'mle', default=None
        Number of components to keep.
        if n_components is not set all components are kept::

            n_components == min(n_samples, n_features)

        If ``n_components == 'mle'`` and ``svd_solver == 'full'``, Minka's
        MLE is used to guess the dimension. Use of ``n_components == 'mle'``
        will interpret ``svd_solver == 'auto'`` as ``svd_solver == 'full'``.

        If ``0 < n_components < 1`` and ``svd_solver == 'full'``, select the
        number of components such that the amount of variance that needs to be
        explained is greater than the percentage specified by n_components.

        If ``svd_solver == 'arpack'``, the number of components must be
        strictly less than the minimum of n_features and n_samples.

        Hence, the None case results in::

            n_components == min(n_samples, n_features) - 1

    copy : bool, default=True
        If False, data passed to fit are overwritten and running
        fit(X).transform(X) will not yield the expected results,
        use fit_transform(X) instead.

    whiten : bool, default=False
        When True (False by default) the `components_` vectors are multiplied
        by the square root of n_samples and then divided by the singular values
        to ensure uncorrelated outputs with unit component-wise variances.

        Whitening will remove some information from the transformed signal
        (the relative variance scales of the components) but can sometime
        improve the predictive accuracy of the downstream estimators by
        making their data respect some hard-wired assumptions.

    svd_solver : {'auto', 'full', 'covariance_eigh', 'arpack', 'randomized'},            default='auto'
        "auto" :
            The solver is selected by a default 'auto' policy is based on `X.shape` and
            `n_components`: if the input data has fewer than 1000 features and
            more than 10 times as many samples, then the "covariance_eigh"
            solver is used. Otherwise, if the input data is larger than 500x500
            and the number of components to extract is lower than 80% of the
            smallest dimension of the data, then the more efficient
            "randomized" method is selected. Otherwise the exact "full" SVD is
            computed and optionally truncated afterwards.
        "full" :
            Run exact full SVD calling the standard LAPACK solver via
            `scipy.linalg.svd` and select the components by postprocessing
        "covariance_eigh" :
            Precompute the covariance matrix (on centered data), run a
            classical eigenvalue decomposition on the covariance matrix
            typically using LAPACK and select the components by postprocessing.
            This solver is very efficient for n_samples >> n_features and small
            n_features. It is, however, not tractable otherwise for large
            n_features (large memory footprint required to materialize the
            covariance matrix). Also note that compared to the "full" solver,
            this solver effectively doubles the condition number and is
            therefore less numerical stable (e.g. on input data with a large
            range of singular values).
        "arpack" :
            Run SVD truncated to `n_components` calling ARPACK solver via
            `scipy.sparse.linalg.svds`. It requires strictly
            `0 < n_components < min(X.shape)`
        "randomized" :
            Run randomized SVD by the method of Halko et al.

        .. versionadded:: 0.18.0

        .. versionchanged:: 1.5
            Added the 'covariance_eigh' solver.

    tol : float, default=0.0
        Tolerance for singular values computed by svd_solver == 'arpack'.
        Must be of range [0.0, infinity).

        .. versionadded:: 0.18.0

    iterated_power : int or 'auto', default='auto'
        Number of iterations for the power method computed by
        svd_solver == 'randomized'.
        Must be of range [0, infinity).

        .. versionadded:: 0.18.0

    n_oversamples : int, default=10
        This parameter is only relevant when `svd_solver="randomized"`.
        It corresponds to the additional number of random vectors to sample the
        range of `X` so as to ensure proper conditioning. See
        :func:`~sklearn.utils.extmath.randomized_svd` for more details.

        .. versionadded:: 1.1

    power_iteration_normalizer : {'auto', 'QR', 'LU', 'none'}, default='auto'
        Power iteration normalizer for randomized SVD solver.
        Not used by ARPACK. See :func:`~sklearn.utils.extmath.randomized_svd`
        for more details.

        .. versionadded:: 1.1

    random_state : int, RandomState instance or None, default=None
        Used when the 'arpack' or 'randomized' solvers are used. Pass an int
        for reproducible results across multiple function calls.
        See :term:`Glossary <random_state>`.

        .. versionadded:: 0.18.0

    Attributes
    ----------
    components_ : ndarray of shape (n_components, n_features)
        Principal axes in feature space, representing the directions of
        maximum variance in the data. Equivalently, the right singular
        vectors of the centered input data, parallel to its eigenvectors.
        The components are sorted by decreasing ``explained_variance_``.

    explained_variance_ : ndarray of shape (n_components,)
        The amount of variance explained by each of the selected components.
        The variance estimation uses `n_samples - 1` degrees of freedom.

        Equal to n_components largest eigenvalues
        of the covariance matrix of X.

        .. versionadded:: 0.18

    explained_variance_ratio_ : ndarray of shape (n_components,)
        Percentage of variance explained by each of the selected components.

        If ``n_components`` is not set then all components are stored and the
        sum of the ratios is equal to 1.0.

    singular_values_ : ndarray of shape (n_components,)
        The singular values corresponding to each of the selected components.
        The singular values are equal to the 2-norms of the ``n_components``
        variables in the lower-dimensional space.

        .. versionadded:: 0.19

    mean_ : ndarray of shape (n_features,)
        Per-feature empirical mean, estimated from the training set.

        Equal to `X.mean(axis=0)`.

    n_components_ : int
        The estimated number of components. When n_components is set
        to 'mle' or a number between 0 and 1 (with svd_solver == 'full') this
        number is estimated from input data. Otherwise it equals the parameter
        n_components, or the lesser value of n_features and n_samples
        if n_components is None.

    n_samples_ : int
        Number of samples in the training data.

    noise_variance_ : float
        The estimated noise covariance following the Probabilistic PCA model
        from Tipping and Bishop 1999. See "Pattern Recognition and
        Machine Learning" by C. Bishop, 12.2.1 p. 574 or
        http://www.miketipping.com/papers/met-mppca.pdf. It is required to
        compute the estimated data covariance and score samples.

        Equal to the average of (min(n_features, n_samples) - n_components)
        smallest eigenvalues of the covariance matrix of X.

    n_features_in_ : int
        Number of features seen during :term:`fit`.

        .. versionadded:: 0.24

    feature_names_in_ : ndarray of shape (`n_features_in_`,)
        Names of features seen during :term:`fit`. Defined only when `X`
        has feature names that are all strings.

        .. versionadded:: 1.0

    See Also
    --------
    KernelPCA : Kernel Principal Component Analysis.
    SparsePCA : Sparse Principal Component Analysis.
    TruncatedSVD : Dimensionality reduction using truncated SVD.
    IncrementalPCA : Incremental Principal Component Analysis.

    References
    ----------
    For n_components == 'mle', this class uses the method from:
    `Minka, T. P.. "Automatic choice of dimensionality for PCA".
    In NIPS, pp. 598-604 <https://tminka.github.io/papers/pca/minka-pca.pdf>`_

    Implements the probabilistic PCA model from:
    `Tipping, M. E., and Bishop, C. M. (1999). "Probabilistic principal
    component analysis". Journal of the Royal Statistical Society:
    Series B (Statistical Methodology), 61(3), 611-622.
    <http://www.miketipping.com/papers/met-mppca.pdf>`_
    via the score and score_samples methods.

    For svd_solver == 'arpack', refer to `scipy.sparse.linalg.svds`.

    For svd_solver == 'randomized', see:
    :doi:`Halko, N., Martinsson, P. G., and Tropp, J. A. (2011).
    "Finding structure with randomness: Probabilistic algorithms for
    constructing approximate matrix decompositions".
    SIAM review, 53(2), 217-288.
    <10.1137/090771806>`
    and also
    :doi:`Martinsson, P. G., Rokhlin, V., and Tygert, M. (2011).
    "A randomized algorithm for the decomposition of matrices".
    Applied and Computational Harmonic Analysis, 30(1), 47-68.
    <10.1016/j.acha.2010.02.003>`

    Examples
    --------
    >>> import numpy as np
    >>> from sklearn.decomposition import PCA
    >>> X = np.array([[-1, -1], [-2, -1], [-3, -2], [1, 1], [2, 1], [3, 2]])
    >>> pca = PCA(n_components=2)
    >>> pca.fit(X)
    PCA(n_components=2)
    >>> print(pca.explained_variance_ratio_)
    [0.9924... 0.0075...]
    >>> print(pca.singular_values_)
    [6.30061... 0.54980...]

    >>> pca = PCA(n_components=2, svd_solver='full')
    >>> pca.fit(X)
    PCA(n_components=2, svd_solver='full')
    >>> print(pca.explained_variance_ratio_)
    [0.9924... 0.00755...]
    >>> print(pca.singular_values_)
    [6.30061... 0.54980...]

    >>> pca = PCA(n_components=1, svd_solver='arpack')
    >>> pca.fit(X)
    PCA(n_components=1, svd_solver='arpack')
    >>> print(pca.explained_variance_ratio_)
    [0.99244...]
    >>> print(pca.singular_values_)
    [6.30061...]
    r   Nleft)closedr   neithermleboolean>   autofullarpack
randomizedcovariance_eighrL   >   LUQRrL   nonerandom_state	n_componentsr#   whiten
svd_solvertoliterated_powern_oversamplespower_iteration_normalizerrT   _parameter_constraintsTFr!   
   )r#   rW   rX   rY   rZ   r[   r\   rT   c                    || _         || _        || _        || _        || _        || _        || _        || _        |	| _        d S NrU   )
selfrV   r#   rW   rX   rY   rZ   r[   r\   rT   s
             r>   __init__zPCA.__init__  sN     )	$,**D'(r@   )prefer_skip_nested_validationc                 0    |                      |           | S )a  Fit the model with X.

        Parameters
        ----------
        X : {array-like, sparse matrix} of shape (n_samples, n_features)
            Training data, where `n_samples` is the number of samples
            and `n_features` is the number of features.

        y : Ignored
            Ignored.

        Returns
        -------
        self : object
            Returns the instance itself.
        )_fit)ra   Xys      r>   fitzPCA.fit  s    $ 			!r@   c                    |                      |          \  }}}}}}|O|ddd| j        f         }| j        r!|t          |j        d         dz
            z  }n||d| j                 z  }|S |                     |||          S )ax  Fit the model with X and apply the dimensionality reduction on X.

        Parameters
        ----------
        X : {array-like, sparse matrix} of shape (n_samples, n_features)
            Training data, where `n_samples` is the number of samples
            and `n_features` is the number of features.

        y : Ignored
            Ignored.

        Returns
        -------
        X_new : ndarray of shape (n_samples, n_components)
            Transformed values.

        Notes
        -----
        This method returns a Fortran-ordered array. To convert it to a
        C-ordered array, use 'np.ascontiguousarray'.
        Nr   r   )x_is_centered)re   n_components_rW   r   r$   
_transform)ra   rf   rg   USr0   rj   r/   s           r>   fit_transformzPCA.fit_transform  s    . )-		!%1aM2=!!!)t)))*A{ -T!'!*q.))) Q+++,,H??1b?FFFr@   c           	         t          |          \  }}t          |          r!| j        dvrt          d| j         d          | j        dk    r|rt	          d          t          | ||j        |j        gdddd	          }| j        | _        | j        d
k    rt          |          rd| _        | j	        8| j        dk    rt          |j                  }nt          |j                  dz
  }n| j	        }| j        d
k    r|j        d         dk    r'|j        d         d|j        d         z  k    rd| _        nZt          |j                  dk    s|dk    rd| _        n4d|cxk    rdt          |j                  z  k     rn nd| _        nd| _        | j        dv r|                     ||||          S | j        dv r|                     |||          S dS )z?Dispatch to the right submethod depending on the chosen solver.rL   rN   rP   zWPCA only support sparse inputs with the "arpack" and "covariance_eigh" solvers, while "z:" was passed. See TruncatedSVD for a possible alternative.rN   zCPCA with svd_solver='arpack' is not supported for Array API inputs.T)csrcscF)dtypeforce_writeableaccept_sparse	ensure_2dr#   rL   Nr   i  r   r^   rP   i  rJ   rM   g?rO   )rM   rP   )rN   rO   )r   r   rX   	TypeErrorr%   r   float64float32_fit_svd_solverrV   minr$   r*   	_fit_full_fit_truncated)ra   rf   r/   is_array_api_compliantrV   s        r>   re   zPCA._fit  s5   %21%5%5"" A;; 	4?2WWW<6:o< < <  
 ?h&&+A&U   :rz* (
 
 
  $6))hqkk)#+D $#x//"17||"17||a/,L6)) wqzU""qwqzR!'!*_'D'D'8$$QW$$(=(='-$$l7777S3qw<<%777777'3$$ (.$ #>>>>>!\27MNNN!%===&&q,;;; >=r@   c           	         |j         \  }}|dk    r||k     rt          d          nHd|cxk    rt          ||          k    s-n t          d| dt          ||           d| j                  |                    |d          | _        |                    |                    | j                  d          | _        | j        d	k    r|| j        r|                    |d
          n|}|| j        z  }| j         }|st          j
        |d          \  }	}
}n |j	        
                    |d          \  }	}
}|
dz  |dz
  z  }n| j        dk    sJ d}|j        |z  }|||                    | j        d          z  |                    | j        d          z  z  }||dz
  z  }|j	                            |          \  }}|                    |                    |          d          }|                    |          }|                    |d          }|                    |d          }d||dk     <   |}|                    ||dz
  z            }
|j        }d}	t          |	|d          \  }	}|}|                    |          }||z  }|                    |
d
          }|dk    rt#          ||          }nOd|cxk     rdk     rBn n?|rt%          ||          }n|}t'          |          }t)          j        ||d          dz   }|t          ||          k     r#|                    ||d                   | _        nd| _        || _        || _        |                    |d|ddf         d
          | _        |                    |d|         d
          | _        |                    |d|         d
          | _        |                    |d|         d
          | _        |	|
||||fS )z)Fit the model by computing full SVD on X.rJ   z?n_components='mle' is only supported if n_samples >= n_featuresr   n_components=z2 must be between 0 and min(n_samples, n_features)=z with svd_solver=axis)rM   Tr"   F)full_matricesr   r   rP   )r   r   )r   r   r!   Nu_based_decisionr    )r/   right)side)r$   r%   r|   r{   meanmean_reshaper+   r#   r   svdTeighflipr   r   r)   rD   r   r   npsearchsortednoise_variance_
n_samples_rk   components_explained_variance_explained_variance_ratio_singular_values_)ra   rf   rV   r/   r   r.   r1   
X_centeredrj   rm   rn   Vtr   C	eigenvals	eigenvecsr   	total_varr   r   explained_variance_ratio_npratio_cumsums                         r>   r}   zPCA._fit_full"  s    !	:5  :%% U   & l@@@@c)Z&@&@@@@@7 7 7.1)Z.H.H7 7"27 7   WWQQW''
 ZZ

4: 6 6>>
6))59YEAD111AJ$*$J $	MM) 
J ":jFFF1bb9==5=II1b#$a4IM": '+<<<<<  "MaA**TZ112**TZ112A
 QA#%9>>!#4#4 Iy 

2::i#8#8%@@I

9--I	22I	22I *-Ii#o&"+ 	Y]344ABA B7772 FF.//	$7)$C!::ad:33 5  +,?KKLL######### & H /@-"/ / /++ /H+()DEEL?<GTTTWXXL #j)4444#%77+>|}}+M#N#ND  #&D #) ::k-<-2B&C$:OO $&::.T $. $
 $
  *,%m|m44 *4 *
 *
& !#

+;M\M+JQU
 V V!RM2--r@   c           	      Z   |j         \  }}| j        }t          |t                    rt	          d|d|d          d|cxk    rt          ||          k    s)n t	          d|dt          ||          d|d          |dk    r;|t          ||          k    r't	          d|dt          ||          d|d          t          | j                  }d	}t          |          rNt          |d
          \  | _
        }	|	                                |z  |dz
  z  }t          || j
                  }
d}nN|                    |d
          | _
        | j        r|                    |d          n|}
|
| j
        z  }
| j         }|dk    rut!          t          |j                   |          }t#          |
|| j        |          \  }}}|d	d	d         }t'          |d	d	d	d	df         |d	d	d         d          \  }}nD|dk    r>t)          |
|| j        | j        | j        d|          \  }}}t'          ||d          \  }}|| _        || _        || _        |dz  |dz
  z  | _        |-|j         d
         dz
  }|
dz  }
|                    |
          |z  }| j        |z  | _        |                    |d          | _        | j        t          ||          k     rD||                    | j                  z
  | _        | xj        t          ||          |z
  z  c_        nd| _        ||||||fS )zYFit the model by computing truncated SVD (by ARPACK or randomized)
        on X.
        r   z% cannot be a string with svd_solver=''r   z2 must be between 1 and min(n_samples, n_features)=z with svd_solver='rN   z7 must be strictly less than min(n_samples, n_features)=Nr   r   FTr"   )krY   v0r   r   rO   )rV   r[   n_iterr\   	flip_signrT   r   r!   )r$   r{   
isinstancestrr%   r|   r   rT   r   r   r   r)   r   r   r#   r+   r   r	   rY   r   r   r[   rZ   r\   r   r   rk   r   r   r   r   )ra   rf   rV   r/   r.   r1   rX   rT   r   varr   rj   r   rm   rn   r   Ns                    r>   r~   zPCA._fit_truncated  s    !"	:)
lC(( 	*<<-   l@@@@c)Z&@&@@@@@*  <<Y
!;!;!;!;ZZZI   8##Iz8R8R(R(R*  <<Y
!;!;!;!;ZZZI   *$*;<< 	A;; 		*0;;;ODJ		I-Q?I0DJ??J!MM++DJ59YEAD111AJ$*$J $	MM!! QW|<<BJ,DHLLLHAq" $$B$AQqqq$$B$wZDDbDEJJJEArr<''%)"0*+/+J)  HAq" QU;;;EAr#) %&qDY]#;  
QA1Jz**Q.I)-)AI)M& "

14
 8 8J	 : :::#,rvvd6N/O/O#OD   C
I$>$>$MM   #&D !RM2--r@   c                    t          |            t          |          \  }}t          | ||j        |j        gd          }|| j        z
  }|j        d         }|                                 }d|                    |||z  z  d          z  }|d|t          dt          j        z            z  t          |          z
  z  z  }|S )a  Return the log-likelihood of each sample.

        See. "Pattern Recognition and Machine Learning"
        by C. Bishop, 12.2.1 p. 574
        or http://www.miketipping.com/papers/met-mppca.pdf

        Parameters
        ----------
        X : array-like of shape (n_samples, n_features)
            The data.

        Returns
        -------
        ll : ndarray of shape (n_samples,)
            Log-likelihood of each sample under the current model.
        F)rt   resetr   g      r   g      ?r   )r   r   r   ry   rz   r   r$   get_precisionr)   r   r   r(   r   )ra   rf   r/   r0   Xrr1   	precisionlog_likes           r>   score_sampleszPCA.score_samples   s    " 	a  A$"*bj)AOOO^WQZ
&&((	"&&rI~!6Q&???C:C"%K(8(88;y;Q;QQRRr@   c                     t          |          \  }}t          |                    |                     |                              S )a  Return the average log-likelihood of all samples.

        See. "Pattern Recognition and Machine Learning"
        by C. Bishop, 12.2.1 p. 574
        or http://www.miketipping.com/papers/met-mppca.pdf

        Parameters
        ----------
        X : array-like of shape (n_samples, n_features)
            The data.

        y : Ignored
            Ignored.

        Returns
        -------
        ll : float
            Average log-likelihood of the samples under the current model.
        )r   floatr   r   )ra   rf   rg   r/   r0   s        r>   scorez	PCA.score;  s=    ( a  ARWWT//2233444r@   c                     t                                                      }ddg|j        _        d|_        | j        dv |j        _        |S )Nry   rz   Trq   )super__sklearn_tags__transformer_tagspreserves_dtypearray_api_supportrX   
input_tagssparse)ra   tags	__class__s     r>   r   zPCA.__sklearn_tags__R  sM    ww''))1:I0F-!%!% 5
 "

 r@   r`   )__name__
__module____qualname____doc__r   r   r   r   r   r]   dict__annotations__rb   r   rh   ro   re   r}   r~   r   r   r   __classcell__)r   s   @r>   rF   rF   s   sC        E ER HXq$v666HZAi888Jw	
 +JRRRSS
 q$v6667Jx  HXq$v666
 #(8QVDDDE'1z2N2N2N'O'O&P'('$ $D   0 ) #)) ) ) ) ). \555   65( \555#G #G #G 65#GJ=< =< =<~^. ^. ^.@\. \. \.|  65 5 5 5.	 	 	 	 	 	 	 	 	r@   rF   ).r   mathr   r   numbersr   r   numpyr   scipyr   scipy.sparser   scipy.sparse.linalgr	   scipy.specialr
   baser   utilsr   utils._arpackr   utils._array_apir   r   utils._param_validationr   r   r   utils.extmathr   r   r   r   utils.sparsefuncsr   r   utils.validationr   r   _baser   r?   rD   rF    r@   r>   <module>r      s   # #
         " " " " " " " "           ! ! ! ! ! ! $ $ $ $ $ $ ! ! ! ! ! !       & & & & & & + + + + + + ? ? ? ? ? ? ? ? F F F F F F F F F F P P P P P P P P P P P P K K K K K K K K = = = = = = = =      H H HV  h h h h h( h h h h hr@   