
    -in                     x   S r SSKrSSKJrJr  SSKJrJr  SSKr	SSK
Jr  SSKJr  SSKJrJrJrJr  SSKJr  SS	KJr  SS
KJrJrJr  SSKJr  SSKJr  SSK J!r!J"r"J#r#  / SQr$\" S\" \SSSS9/S\" \SSSS9/S.SS9SS.S j5       r%S r&S r'S$S jr(S%S jr) " S S\\\\S9r* " S  S!\*5      r+ " S" S#\*5      r,g)&aQ  Random projection transformers.

Random projections are a simple and computationally efficient way to
reduce the dimensionality of the data by trading a controlled amount
of accuracy (as additional variance) for faster processing times and
smaller model sizes.

The dimensions and distribution of random projections matrices are
controlled so as to preserve the pairwise distances between any two
samples of the dataset.

The main theoretical result behind the efficiency of random projection is the
`Johnson-Lindenstrauss lemma (quoting Wikipedia)
<https://en.wikipedia.org/wiki/Johnson%E2%80%93Lindenstrauss_lemma>`_:

  In mathematics, the Johnson-Lindenstrauss lemma is a result
  concerning low-distortion embeddings of points from high-dimensional
  into low-dimensional Euclidean space. The lemma states that a small set
  of points in a high-dimensional space can be embedded into a space of
  much lower dimension in such a way that distances between the points are
  nearly preserved. The map used for the embedding is at least Lipschitz,
  and can even be taken to be an orthogonal projection.
    N)ABCMetaabstractmethod)IntegralReal)linalg   )BaseEstimatorClassNamePrefixFeaturesOutMixinTransformerMixin_fit_context)DataDimensionalityWarning)check_random_state)Interval
StrOptionsvalidate_params)safe_sparse_dot)sample_without_replacement)check_arraycheck_is_fittedvalidate_data)GaussianRandomProjectionSparseRandomProjectionjohnson_lindenstrauss_min_dimz
array-likeleftclosedneither	n_samplesepsTprefer_skip_nested_validation皙?)r    c                   [         R                  " U5      n[         R                  " U 5      n [         R                  " US:*  5      (       d  [         R                  " US:  5      (       a  [        SU-  5      e[         R                  " U S:*  5      (       a  [        SU -  5      eUS-  S-  US-  S-  -
  nS[         R                  " U 5      -  U-  R                  [         R                  5      $ )	a	  Find a 'safe' number of components to randomly project to.

The distortion introduced by a random projection `p` only changes the
distance between two points by a factor (1 +- eps) in a euclidean space
with good probability. The projection `p` is an eps-embedding as defined
by:

.. code-block:: text

  (1 - eps) ||u - v||^2 < ||p(u) - p(v)||^2 < (1 + eps) ||u - v||^2

Where u and v are any rows taken from a dataset of shape (n_samples,
n_features), eps is in ]0, 1[ and p is a projection by a random Gaussian
N(0, 1) matrix of shape (n_components, n_features) (or a sparse
Achlioptas matrix).

The minimum number of components to guarantee the eps-embedding is
given by:

.. code-block:: text

  n_components >= 4 log(n_samples) / (eps^2 / 2 - eps^3 / 3)

Note that the number of dimensions is independent of the original
number of features but instead depends on the size of the dataset:
the larger the dataset, the higher is the minimal dimensionality of
an eps-embedding.

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

Parameters
----------
n_samples : int or array-like of int
    Number of samples that should be an integer greater than 0. If an array
    is given, it will compute a safe number of components array-wise.

eps : float or array-like of shape (n_components,), dtype=float,             default=0.1
    Maximum distortion rate in the range (0, 1) as defined by the
    Johnson-Lindenstrauss lemma. If an array is given, it will compute a
    safe number of components array-wise.

Returns
-------
n_components : int or ndarray of int
    The minimal number of components to guarantee with good probability
    an eps-embedding with n_samples.

References
----------

.. [1] https://en.wikipedia.org/wiki/Johnson%E2%80%93Lindenstrauss_lemma

.. [2] `Sanjoy Dasgupta and Anupam Gupta, 1999,
       "An elementary proof of the Johnson-Lindenstrauss Lemma."
       <https://citeseerx.ist.psu.edu/doc_view/pid/95cd464d27c25c9c8690b378b894d337cdf021f9>`_

Examples
--------
>>> from sklearn.random_projection import johnson_lindenstrauss_min_dim
>>> johnson_lindenstrauss_min_dim(1e6, eps=0.5)
np.int64(663)

>>> johnson_lindenstrauss_min_dim(1e6, eps=[0.5, 0.1, 0.01])
array([    663,   11841, 1112658])

>>> johnson_lindenstrauss_min_dim([1e4, 1e5, 1e6], eps=0.1)
array([ 7894,  9868, 11841])
        r   z1The JL bound is defined for eps in ]0, 1[, got %rr   z?The JL bound is defined for n_samples greater than zero, got %r         )npasarrayany
ValueErrorlogastypeint64)r   r    denominators      L/var/www/html/venv/lib/python3.13/site-packages/sklearn/random_projection.pyr   r   8   s    Z **S/C

9%I	vvcSjRVVC1H--LsRSS	vvi1nM
 	

 6A:#q&1*-Ky!!K/77AA    c                 |    U S:X  a  S[         R                  " U5      -  n U $ U S::  d  U S:  a  [        SU -  5      eU $ )z.Factorize density check according to Li et al.autor   r   z)Expected density in range ]0, 1], got: %r)r)   sqrtr,   )density
n_featuress     r1   _check_densityr8      sI    &bggj)) N 
A1DwNOONr2   c                 T    U S::  a  [        SU -  5      eUS::  a  [        SU-  5      eg)z9Factorize argument checking for random matrix generation.r   z.n_components must be strictly positive, got %dz,n_features must be strictly positive, got %dN)r,   )n_componentsr7   s     r1   _check_input_sizer;      s>    q<|K
 	
 QG*TUU r2   c                     [        X5        [        U5      nUR                  SS[        R                  " U 5      -  X4S9nU$ )a
  Generate a dense Gaussian random matrix.

The components of the random matrix are drawn from

    N(0, 1.0 / n_components).

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

Parameters
----------
n_components : int,
    Dimensionality of the target projection space.

n_features : int,
    Dimensionality of the original source space.

random_state : int, RandomState instance or None, default=None
    Controls the pseudo random number generator used to generate the matrix
    at fit time.
    Pass an int for reproducible output across multiple function calls.
    See :term:`Glossary <random_state>`.

Returns
-------
components : ndarray of shape (n_components, n_features)
    The generated Gaussian random matrix.

See Also
--------
GaussianRandomProjection
r%         ?)locscalesize)r;   r   normalr)   r5   )r:   r7   random_staterng
componentss        r1   _gaussian_random_matrixrE      sJ    @ l/
\
*CsRWW\22,9S  J r2   c                    [        X5        [        X!5      n[        U5      nUS:X  a6  UR                  SSX45      S-  S-
  nS[        R
                  " U 5      -  U-  $ / nSnU/n[        U 5       HD  n	UR                  X5      n
[        XUS9nUR                  U5        Xz-  nUR                  U5        MF     [        R                  " U5      nUR                  SS[        R                  " U5      S9S-  S-
  n[        R                  " XU4X4S9n[        R
                  " SU-  5      [        R
                  " U 5      -  U-  $ )a>  Generalized Achlioptas random sparse matrix for random projection.

Setting density to 1 / 3 will yield the original matrix by Dimitris
Achlioptas while setting a lower value will yield the generalization
by Ping Li et al.

If we note :math:`s = 1 / density`, the components of the random matrix are
drawn from:

  - -sqrt(s) / sqrt(n_components)   with probability 1 / 2s
  -  0                              with probability 1 - 1 / s
  - +sqrt(s) / sqrt(n_components)   with probability 1 / 2s

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

Parameters
----------
n_components : int,
    Dimensionality of the target projection space.

n_features : int,
    Dimensionality of the original source space.

density : float or 'auto', default='auto'
    Ratio of non-zero component in the random projection matrix in the
    range `(0, 1]`

    If density = 'auto', the value is set to the minimum density
    as recommended by Ping Li et al.: 1 / sqrt(n_features).

    Use density = 1 / 3.0 if you want to reproduce the results from
    Achlioptas, 2001.

random_state : int, RandomState instance or None, default=None
    Controls the pseudo random number generator used to generate the matrix
    at fit time.
    Pass an int for reproducible output across multiple function calls.
    See :term:`Glossary <random_state>`.

Returns
-------
components : {ndarray, sparse matrix} of shape (n_components, n_features)
    The generated Gaussian random matrix. Sparse matrix will be of CSR
    format.

See Also
--------
SparseRandomProjection

References
----------

.. [1] Ping Li, T. Hastie and K. W. Church, 2006,
       "Very Sparse Random Projections".
       https://web.stanford.edu/~hastie/Papers/Ping/KDD06_rp.pdf

.. [2] D. Achlioptas, 2001, "Database-friendly random projections",
       https://cgi.di.uoa.gr/~optas/papers/jl.pdf

r   g      ?r&   r   rB   )r@   )shape)r;   r8   r   binomialr)   r5   ranger   appendconcatenater@   sp
csr_matrix)r:   r7   r6   rB   rC   rD   indicesoffsetindptr_n_nonzero_i	indices_idatas                r1   _sparse_random_matrixrV      s?   z l/W1G
\
*C!|\\!S<*DEIAM
277<((:55 |$A,,z;K2cI NN9%!FMM&! % ..) ||As)9|:Q>B ]]F#L+E

 wwq7{#bggl&;;jHHr2   c                      ^  \ rS rSr% Sr\" \SSSS9\" S15      /\" \SSS	S9/S
/S/S.r	\
\S'   \ SSSSS.S jj5       r\S 5       rS r\" SS9SS j5       rS rU 4S jrSrU =r$ )BaseRandomProjectioni3  zrBase class for random projections.

Warning: This class should not be used directly.
Use derived classes instead.
r   Nr   r   r4   r   r   booleanrB   r:   r    compute_inverse_componentsrB   _parameter_constraintsr#   Fr    r[   rB   c                4    Xl         X l        X0l        X@l        g NrZ   )selfr:   r    r[   rB   s        r1   __init__BaseRandomProjection.__init__F  s     )*D'(r2   c                     g)ak  Generate the random projection matrix.

Parameters
----------
n_components : int,
    Dimensionality of the target projection space.

n_features : int,
    Dimensionality of the original source space.

Returns
-------
components : {ndarray, sparse matrix} of shape (n_components, n_features)
    The generated random matrix. Sparse matrix will be of CSR format.

N )r`   r:   r7   s      r1   _make_random_matrix(BaseRandomProjection._make_random_matrixT  s    r2   c                     U R                   n[        R                  " U5      (       a  UR                  5       n[        R
                  " USS9$ )z9Compute the pseudo-inverse of the (densified) components.F)check_finite)components_rM   issparsetoarrayr   pinv)r`   rD   s     r1   _compute_inverse_components0BaseRandomProjection._compute_inverse_componentsg  s;    %%
;;z""#++-J{{:E::r2   Tr!   c                    [        XSS/[        R                  [        R                  /S9nUR                  u  p4U R
                  S:X  a  [        X0R                  S9U l        U R                  S::  a$  [        SU R                  X0R                  4-  5      eU R                  U:  a%  [        SU R                  X0R                  U4-  5      eOOU R
                  U:  a.  [        R                  " S	U< S
U R
                  < S3[        5        U R
                  U l        U R                  U R                  U5      R                  UR                  SS9U l        U R"                  (       a  U R%                  5       U l        U R
                  U l        U $ )a  Generate a sparse random projection matrix.

Parameters
----------
X : {ndarray, sparse matrix} of shape (n_samples, n_features)
    Training set: only the shape is used to find optimal random
    matrix dimensions based on the theory referenced in the
    afore mentioned papers.

y : Ignored
    Not used, present here for API consistency by convention.

Returns
-------
self : object
    BaseRandomProjection class instance.
csrcsc)accept_sparsedtyper4   r   r   zIeps=%f and n_samples=%d lead to a target dimension of %d which is invalidzseps=%f and n_samples=%d lead to a target dimension of %d which is larger than the original space with n_features=%dz[The number of components is higher than the number of features: n_features < n_components (z < z8).The dimensionality of the problem will not be reduced.F)copy)r   r)   float64float32rH   r:   r   r    n_components_r,   warningswarnr   re   r.   rs   ri   r[   rm   inverse_components__n_features_out)r`   Xyr   r7   s        r1   fitBaseRandomProjection.fitn  s|   & E5>"**bjj9Q
 !"	&!>#"D !!Q& *-1XXyBTBT,UV 
 ##j0 $ xx,>,>
KL  1   :- "4#4#46 . "&!2!2D  33


&u&
% 	 **'+'G'G'ID$  $00r2   c                     [        U 5        [        U[        R                  [        R                  /SS9nU R
                  (       a  XR                  R                  -  $ U R                  5       nXR                  -  $ )a  Project data back to its original space.

Returns an array X_original whose transform would be X. Note that even
if X is sparse, X_original is dense: this may use a lot of RAM.

If `compute_inverse_components` is False, the inverse of the components is
computed during each call to `inverse_transform` which can be costly.

Parameters
----------
X : {array-like, sparse matrix} of shape (n_samples, n_components)
    Data to be transformed back.

Returns
-------
X_original : ndarray of shape (n_samples, n_features)
    Reconstructed data.
)rp   rq   )rs   rr   )	r   r   r)   ru   rv   r[   rz   Trm   )r`   r|   inverse_componentss      r1   inverse_transform&BaseRandomProjection.inverse_transform  sc    & 	"**bjj!9X**//1111!==?''''r2   c                 l   > [         TU ]  5       nSS/UR                  l        SUR                  l        U$ )Nru   rv   T)super__sklearn_tags__transformer_tagspreserves_dtype
input_tagssparse)r`   tags	__class__s     r1   r   %BaseRandomProjection.__sklearn_tags__  s4    w')1:I0F-!%r2   )r{   ri   r[   r    rz   r:   rw   rB   r4   r_   )__name__
__module____qualname____firstlineno____doc__r   r   r   r   r\   dict__annotations__r   ra   re   rm   r   r~   r   r   __static_attributes____classcell__r   s   @r1   rX   rX   3  s     Xq$v6x 
 q$y9:'0k'($D   ) #() )  $; 5A 6AF(: r2   rX   )	metaclassc                   J   ^  \ rS rSrSr SSSSS.U 4S jjjrS rS	 rS
rU =r	$ )r   i  a
  Reduce dimensionality through Gaussian random projection.

The components of the random matrix are drawn from N(0, 1 / n_components).

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

.. versionadded:: 0.13

Parameters
----------
n_components : int or 'auto', default='auto'
    Dimensionality of the target projection space.

    n_components can be automatically adjusted according to the
    number of samples in the dataset and the bound given by the
    Johnson-Lindenstrauss lemma. In that case the quality of the
    embedding is controlled by the ``eps`` parameter.

    It should be noted that Johnson-Lindenstrauss lemma can yield
    very conservative estimated of the required number of components
    as it makes no assumption on the structure of the dataset.

eps : float, default=0.1
    Parameter to control the quality of the embedding according to
    the Johnson-Lindenstrauss lemma when `n_components` is set to
    'auto'. The value should be strictly positive.

    Smaller values lead to better embedding and higher number of
    dimensions (n_components) in the target projection space.

compute_inverse_components : bool, default=False
    Learn the inverse transform by computing the pseudo-inverse of the
    components during fit. Note that computing the pseudo-inverse does not
    scale well to large matrices.

random_state : int, RandomState instance or None, default=None
    Controls the pseudo random number generator used to generate the
    projection matrix at fit time.
    Pass an int for reproducible output across multiple function calls.
    See :term:`Glossary <random_state>`.

Attributes
----------
n_components_ : int
    Concrete number of components computed when n_components="auto".

components_ : ndarray of shape (n_components, n_features)
    Random matrix used for the projection.

inverse_components_ : ndarray of shape (n_features, n_components)
    Pseudo-inverse of the components, only computed if
    `compute_inverse_components` is True.

    .. versionadded:: 1.1

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
--------
SparseRandomProjection : Reduce dimensionality through sparse
    random projection.

Examples
--------
>>> import numpy as np
>>> from sklearn.random_projection import GaussianRandomProjection
>>> rng = np.random.RandomState(42)
>>> X = rng.rand(25, 3000)
>>> transformer = GaussianRandomProjection(random_state=rng)
>>> X_new = transformer.fit_transform(X)
>>> X_new.shape
(25, 2759)
r#   FNr]   c                &   > [         TU ]  UUUUS9  g NrZ   )r   ra   )r`   r:   r    r[   rB   r   s        r1   ra   !GaussianRandomProjection.__init__*  s#     	%'A%	 	 	
r2   c                 @    [        U R                  5      n[        XUS9$ )a4  Generate the random projection matrix.

Parameters
----------
n_components : int,
    Dimensionality of the target projection space.

n_features : int,
    Dimensionality of the original source space.

Returns
-------
components : ndarray of shape (n_components, n_features)
    The generated random matrix.
rG   )r   rB   rE   r`   r:   r7   rB   s       r1   re   ,GaussianRandomProjection._make_random_matrix9  s&      *$*;*;<&<
 	
r2   c                     [        U 5        [        U USS/S[        R                  [        R                  /S9nXR
                  R                  -  $ )a/  Project the data by using matrix product with the random matrix.

Parameters
----------
X : {ndarray, sparse matrix} of shape (n_samples, n_features)
    The input data to project into a smaller dimensional space.

Returns
-------
X_new : ndarray of shape (n_samples, n_components)
    Projected array.
rp   rq   Frr   resetrs   )r   r   r)   ru   rv   ri   r   r`   r|   s     r1   	transform"GaussianRandomProjection.transformN  sM     	 %.::rzz*
 ##%%%%r2   rd   r   )
r   r   r   r   r   ra   re   r   r   r   r   s   @r1   r   r     s8    Qj 
 #(
 

*& &r2   r   c                      ^  \ rS rSr% Sr0 \R                  E\" \SSSS9\	" S15      /S/S	.Er\
\S
'    SSSSSSS.U 4S jjjrS rS rSrU =r$ )r   ig  a  Reduce dimensionality through sparse random projection.

Sparse random matrix is an alternative to dense random
projection matrix that guarantees similar embedding quality while being
much more memory efficient and allowing faster computation of the
projected data.

If we note `s = 1 / density` the components of the random matrix are
drawn from:

.. code-block:: text

  -sqrt(s) / sqrt(n_components)   with probability 1 / 2s
   0                              with probability 1 - 1 / s
  +sqrt(s) / sqrt(n_components)   with probability 1 / 2s

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

.. versionadded:: 0.13

Parameters
----------
n_components : int or 'auto', default='auto'
    Dimensionality of the target projection space.

    n_components can be automatically adjusted according to the
    number of samples in the dataset and the bound given by the
    Johnson-Lindenstrauss lemma. In that case the quality of the
    embedding is controlled by the ``eps`` parameter.

    It should be noted that Johnson-Lindenstrauss lemma can yield
    very conservative estimated of the required number of components
    as it makes no assumption on the structure of the dataset.

density : float or 'auto', default='auto'
    Ratio in the range (0, 1] of non-zero component in the random
    projection matrix.

    If density = 'auto', the value is set to the minimum density
    as recommended by Ping Li et al.: 1 / sqrt(n_features).

    Use density = 1 / 3.0 if you want to reproduce the results from
    Achlioptas, 2001.

eps : float, default=0.1
    Parameter to control the quality of the embedding according to
    the Johnson-Lindenstrauss lemma when n_components is set to
    'auto'. This value should be strictly positive.

    Smaller values lead to better embedding and higher number of
    dimensions (n_components) in the target projection space.

dense_output : bool, default=False
    If True, ensure that the output of the random projection is a
    dense numpy array even if the input and random projection matrix
    are both sparse. In practice, if the number of components is
    small the number of zero components in the projected data will
    be very small and it will be more CPU and memory efficient to
    use a dense representation.

    If False, the projected data uses a sparse representation if
    the input is sparse.

compute_inverse_components : bool, default=False
    Learn the inverse transform by computing the pseudo-inverse of the
    components during fit. Note that the pseudo-inverse is always a dense
    array, even if the training data was sparse. This means that it might be
    necessary to call `inverse_transform` on a small batch of samples at a
    time to avoid exhausting the available memory on the host. Moreover,
    computing the pseudo-inverse does not scale well to large matrices.

random_state : int, RandomState instance or None, default=None
    Controls the pseudo random number generator used to generate the
    projection matrix at fit time.
    Pass an int for reproducible output across multiple function calls.
    See :term:`Glossary <random_state>`.

Attributes
----------
n_components_ : int
    Concrete number of components computed when n_components="auto".

components_ : sparse matrix of shape (n_components, n_features)
    Random matrix used for the projection. Sparse matrix will be of CSR
    format.

inverse_components_ : ndarray of shape (n_features, n_components)
    Pseudo-inverse of the components, only computed if
    `compute_inverse_components` is True.

    .. versionadded:: 1.1

density_ : float in range 0.0 - 1.0
    Concrete density computed from when density = "auto".

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
--------
GaussianRandomProjection : Reduce dimensionality through Gaussian
    random projection.

References
----------

.. [1] Ping Li, T. Hastie and K. W. Church, 2006,
       "Very Sparse Random Projections".
       https://web.stanford.edu/~hastie/Papers/Ping/KDD06_rp.pdf

.. [2] D. Achlioptas, 2001, "Database-friendly random projections",
       https://cgi.di.uoa.gr/~optas/papers/jl.pdf

Examples
--------
>>> import numpy as np
>>> from sklearn.random_projection import SparseRandomProjection
>>> rng = np.random.RandomState(42)
>>> X = rng.rand(25, 3000)
>>> transformer = SparseRandomProjection(random_state=rng)
>>> X_new = transformer.fit_transform(X)
>>> X_new.shape
(25, 2759)
>>> # very few components are non-zero
>>> np.mean(transformer.components_ != 0)
np.float64(0.0182)
r%   r=   rightr   r4   rY   )r6   dense_outputr\   r#   FN)r6   r    r   r[   rB   c                >   > [         TU ]  UUUUS9  X@l        X l        g r   )r   ra   r   r6   )r`   r:   r6   r    r   r[   rB   r   s          r1   ra   SparseRandomProjection.__init__  s0     	%'A%	 	 	
 )r2   c                     [        U R                  5      n[        U R                  U5      U l        [        XU R                  US9$ )aF  Generate the random projection matrix

Parameters
----------
n_components : int
    Dimensionality of the target projection space.

n_features : int
    Dimensionality of the original source space.

Returns
-------
components : sparse matrix of shape (n_components, n_features)
    The generated random matrix in CSR format.

)r6   rB   )r   rB   r8   r6   density_rV   r   s       r1   re   *SparseRandomProjection._make_random_matrix
  s>    " *$*;*;<&t||Z@$dmm,
 	
r2   c                     [        U 5        [        U USS/S[        R                  [        R                  /S9n[        XR                  R                  U R                  S9$ )a  Project the data by using matrix product with the random matrix.

Parameters
----------
X : {ndarray, sparse matrix} of shape (n_samples, n_features)
    The input data to project into a smaller dimensional space.

Returns
-------
X_new : {ndarray, sparse matrix} of shape (n_samples, n_components)
    Projected array. It is a sparse matrix only when the input is sparse and
    `dense_output = False`.
rp   rq   Fr   )r   )	r   r   r)   ru   rv   r   ri   r   r   r   s     r1   r    SparseRandomProjection.transform!  sW     	 %.::rzz*
 q"2"2"4"44CTCTUUr2   )r   r6   r   r   )r   r   r   r   r   rX   r\   r   r   r   r   r   ra   re   r   r   r   r   s   @r1   r   r   g  s    FP$

5
5$T3G<j&>RS"$D   #( (
.V Vr2   r   r_   )r4   N)-r   rx   abcr   r   numbersr   r   numpyr)   scipy.sparser   rM   scipyr   baser	   r
   r   r   
exceptionsr   utilsr   utils._param_validationr   r   r   utils.extmathr   utils.randomr   utils.validationr   r   r   __all__r   r8   r;   rE   rV   rX   r   r   rd   r2   r1   <module>r      s   6  ' "     2 % J J * 4 I I "HT1d6$JKhtQ)DE #' 58 SBSBlV%P_ID`#%5}PW`FN&3 N&bQV1 QVr2   