§
    ¦˜ºhd•  ã                   óô  — d Z ddlZddl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mZmZ dd	lmZ dd
l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 m!Z! dZ"d%d„Z#	 	 	 	 	 d&d„Z$ edgej%        g eeddd¬¦  «        dg eeddd¬¦  «        dgd edh¦  «        gdgdgdgdœd¬¦  «        dddddddœd„¦   «         Z&ddddddddœd„Z' G d„ d eee¦  «        Z(	 	 	 	 d'd"„Z) G d#„ d$ee¦  «        Z*dS )(z'Orthogonal matching pursuit algorithms
é    N)Úsqrt)ÚIntegralÚReal)Úlinalg)Úget_lapack_funcsé   )ÚMultiOutputMixinÚRegressorMixinÚ_fit_context)Úcheck_cv)Úas_float_arrayÚcheck_array)ÚHiddenÚIntervalÚ
StrOptionsÚvalidate_params)ÚParallelÚdelayedé   )ÚLinearModelÚ_deprecate_normalizeÚ_pre_fitzŠOrthogonal matching pursuit ended prematurely due to linear dependence in the dictionary. The requested precision might not have been met.TFc                 ó$  — |r|                       d¦  «        } nt          j        | ¦  «        } t          j        | j        ¦  «        j        }t          j        d| f¦  «        \  }}t          d| f¦  «        \  }	t          j	        | j
        |¦  «        }
|}t          j        d¦  «        }d}t          j        | j        d         ¦  «        }|�| j        d         n|}t          j        ||f| j        ¬¦  «        }|rt          j        |¦  «        }	 t          j        t          j        t          j	        | j
        |¦  «        ¦  «        ¦  «        }||k     s|
|         d	z  |k     r#t#          j        t&          t(          d	¬
¦  «         �næ|dk    rát          j	        | dd…d|…f         j
        | dd…|f         ¦  «        ||d|…f<   t          j        |d|…d|…f         ||d|…f         dddd¬¦  «          |||d|…f         ¦  «        d	z  }t          j        | dd…|f         ¦  «        d	z  |z
  }||k    r#t#          j        t&          t(          d	¬
¦  «         �nt/          |¦  «        |||f<   n!t          j        | dd…|f         ¦  «        |d<    || j
        |         | j
        |         ¦  «        \  | j
        |<   | j
        |<   |
|         |
|         c|
|<   |
|<   ||         ||         c||<   ||<   |dz  } |	|d|…d|…f         |
d|…         dd¬¦  «        \  }}|r||d|…|dz
  f<   |t          j	        | dd…d|…f         |¦  «        z
  }|� ||¦  «        d	z  |k    rn	||k    rn�Œ\|r||d|…         |dd…d|…f         |fS ||d|…         |fS )a•  Orthogonal Matching Pursuit step using the Cholesky decomposition.

    Parameters
    ----------
    X : ndarray of shape (n_samples, n_features)
        Input dictionary. Columns are assumed to have unit norm.

    y : ndarray of shape (n_samples,)
        Input targets.

    n_nonzero_coefs : int
        Targeted number of non-zero elements.

    tol : float, default=None
        Targeted squared error, if not None overrides n_nonzero_coefs.

    copy_X : bool, default=True
        Whether the design matrix X must be copied by the algorithm. A false
        value is only helpful if X is already Fortran-ordered, otherwise a
        copy is made anyway.

    return_path : bool, default=False
        Whether to return every value of the nonzero coefficients along the
        forward path. Useful for cross-validation.

    Returns
    -------
    gamma : ndarray of shape (n_nonzero_coefs,)
        Non-zero elements of the solution.

    idx : ndarray of shape (n_nonzero_coefs,)
        Indices of the positions of the elements in gamma within the solution
        vector.

    coef : ndarray of shape (n_features, n_nonzero_coefs)
        The first k values of column k correspond to the coefficient value
        for the active features at that step. The lower left triangle contains
        garbage. Only returned if ``return_path=True``.

    n_active : int
        Number of active features at convergence.
    ÚF©Únrm2Úswap©Úpotrsr   r   N©ÚdtypeTr   ©Ú
stacklevelF©ÚtransÚlowerÚoverwrite_bÚcheck_finite©r   r   ©r&   r'   )ÚcopyÚnpÚasfortranarrayÚfinfor!   Úepsr   Úget_blas_funcsr   ÚdotÚTÚemptyÚarangeÚshapeÚ
empty_likeÚargmaxÚabsÚwarningsÚwarnÚ	prematureÚRuntimeWarningÚsolve_triangularÚnormr   )ÚXÚyÚn_nonzero_coefsÚtolÚcopy_XÚreturn_pathÚ	min_floatr   r   r   ÚalphaÚresidualÚgammaÚn_activeÚindicesÚmax_featuresÚLÚcoefsÚlamÚvÚLkkÚ_s                         úa/var/www/html/services/rag-service/venv/lib/python3.11/site-packages/sklearn/linear_model/_omp.pyÚ_cholesky_omprS      sþ  € ðV ð !Ø�FŠF�3‰KŒKˆˆåÔ˜aÑ Ô ˆå”˜œÑ!Ô!Ô%€IÝÔ&Ð'7¸!¸Ñ>Ô>�J€Dˆ$Ý 
¨Q¨DÑ1Ô1�H€UåŒF�1”3˜‰NŒN€EØ€HÝŒH�Q‰KŒK€EØ€HÝŒi˜œ œ
Ñ#Ô#€Gà!$ �1”7˜1”:�:°o€Lå
Œ�, Ð-°Q´WÐ=Ñ=Ô=€Aàð !Ý”˜aÑ Ô ˆð+ÝŒi�œ�rœv a¤c¨8Ñ4Ô4Ñ5Ô5Ñ6Ô6ˆØ�Š>ˆ>˜U 3œZ¨1™_¨yÒ8Ð8åŒM�)¥^ÀÐBÑBÔBÐBÙà�aŠ<ˆ<å%'¤V¨A¨a¨a¨a°°(°¨l¬OÔ,=¸qÀÀÀÀCÀ¼yÑ%IÔ%IˆAˆh˜	˜˜	Ð!Ñ"ÝÔ#Ø�)�8�)˜Y˜h˜YÐ&Ô'Ø�(˜I˜X˜IÐ%Ô&ØØØ Ø"ðñ ô ð ð ��Q�x  ( Ð*Ô+Ñ,Ô,°Ñ1ˆAÝ”+˜a    3 œiÑ(Ô(¨AÑ-°Ñ1ˆCØ�iÒÐÝ”�i­ÀAÐFÑFÔFÐFÙÝ$(¨¡I¤IˆAˆh˜Ð Ñ!Ð!å”k ! A A A s F¤)Ñ,Ô,ˆAˆd‰Gà"& $ q¤s¨8¤}°a´c¸#´hÑ"?Ô"?ÑˆŒˆH‰�q”s˜3‘xØ&+¨C¤j°%¸´/Ð#ˆˆh‰˜˜s™Ø*1°#¬,¸ÀÔ8IÐ'ˆ�Ñ˜7 3™<Ø�A‰ˆð �5Øˆiˆxˆi˜˜(˜Ð"Ô# U¨9¨H¨9Ô%5¸TÈuð
ñ 
ô 
‰ˆˆqð ð 	3Ø-2ˆE�)�8�)˜X¨™\Ð)Ñ*Ø•r”v˜a    9 H 9 œo¨uÑ5Ô5Ñ5ˆØˆ?˜t˜t H™~œ~°Ñ2°cÒ9Ð9ØØ˜Ò%Ð%ØñW+ðZ ð 3Ø�g˜i˜x˜iÔ(¨%°°°°9°H°9°Ô*=¸xÐGÐGà�g˜i˜x˜iÔ(¨(Ð2Ð2ó    c                 ó0  — |r|                       d¦  «        nt          j        | ¦  «        } |s|j        j        s|                      ¦   «         }t          j        | j        ¦  «        j        }t          j	        d| f¦  «        \  }	}
t          d| f¦  «        \  }t          j        t          | ¦  «        ¦  «        }|}|}d}t          j        d¦  «        }d}|�t          | ¦  «        n|}t          j        ||f| j        ¬¦  «        }d|d<   |rt          j        |¦  «        }	 t          j        t          j        |¦  «        ¦  «        }||k     s||         d
z  |k     r#t#          j        t&          t(          d¬¦  «         �nð|dk    r¦| |d|…f         ||d|…f<   t          j        |d|…d|…f         ||d|…f         ddd	d¬¦  «          |	||d|…f         ¦  «        d
z  }| ||f         |z
  }||k    r#t#          j        t&          t(          d¬¦  «         �nYt-          |¦  «        |||f<   nt-          | ||f         ¦  «        |d<    |
| |         | |         ¦  «        \  | |<   | |<    |
| j        |         | j        |         ¦  «        \  | j        |<   | j        |<   ||         ||         c||<   ||<   ||         ||         c||<   ||<   |dz  } ||d|…d|…f         |d|…         d	d¬¦  «        \  }}|r||d|…|dz
  f<   t          j        | dd…d|…f         |¦  «        }||z
  }|�<||z  }t          j        ||d|…         ¦  «        }||z  }t!          |¦  «        |k    rn
n||k    rn�ŒN|r||d|…         |dd…d|…f         |fS ||d|…         |fS )a®  Orthogonal Matching Pursuit step on a precomputed Gram matrix.

    This function uses the Cholesky decomposition method.

    Parameters
    ----------
    Gram : ndarray of shape (n_features, n_features)
        Gram matrix of the input data matrix.

    Xy : ndarray of shape (n_features,)
        Input targets.

    n_nonzero_coefs : int
        Targeted number of non-zero elements.

    tol_0 : float, default=None
        Squared norm of y, required if tol is not None.

    tol : float, default=None
        Targeted squared error, if not None overrides n_nonzero_coefs.

    copy_Gram : bool, default=True
        Whether the gram matrix must be copied by the algorithm. A false
        value is only helpful if it is already Fortran-ordered, otherwise a
        copy is made anyway.

    copy_Xy : bool, default=True
        Whether the covariance vector Xy must be copied by the algorithm.
        If False, it may be overwritten.

    return_path : bool, default=False
        Whether to return every value of the nonzero coefficients along the
        forward path. Useful for cross-validation.

    Returns
    -------
    gamma : ndarray of shape (n_nonzero_coefs,)
        Non-zero elements of the solution.

    idx : ndarray of shape (n_nonzero_coefs,)
        Indices of the positions of the elements in gamma within the solution
        vector.

    coefs : ndarray of shape (n_features, n_nonzero_coefs)
        The first k values of column k correspond to the coefficient value
        for the active features at that step. The lower left triangle contains
        garbage. Only returned if ``return_path=True``.

    n_active : int
        Number of active features at convergence.
    r   r   r   r   Nr    g      ð?r)   Tr   é   r"   r   Fr$   r*   )r+   r,   r-   ÚflagsÚ	writeabler.   r!   r/   r   r0   r   r4   Úlenr3   r6   r7   r8   r9   r:   r;   r<   r=   r   r2   r1   Úinner)ÚGramÚXyrA   Útol_0rB   Ú	copy_GramÚcopy_XyrD   rE   r   r   r   rJ   rF   Útol_currÚdeltarH   rI   rK   rL   rM   rN   rO   rP   rQ   Úbetas                             rR   Ú	_gram_omprc   ’   s*  € ðz 'ÐCˆ4�9Š9�S‰>Œ>ˆ>­BÔ,=¸dÑ,CÔ,C€Dàð �b”hÔ(ð Ø�WŠW‰YŒYˆå”˜œÑ$Ô$Ô(€IÝÔ&Ð'7¸$¸ÑAÔA�J€Dˆ$Ý 
¨T¨GÑ4Ô4�H€UåŒi�˜D™	œ	Ñ"Ô"€GØ€EØ€HØ€EÝŒH�Q‰KŒK€EØ€Hà # •3�t‘9”9�9°_€Lå
Œ�, Ð-°T´ZÐ@Ñ@Ô@€Aà€A€d�GØð !Ý”˜aÑ Ô ˆð-ÝŒi�œ˜u™œÑ&Ô&ˆØ�Š>ˆ>˜U 3œZ¨1™_¨yÒ8Ð8åŒM�)¥^ÀÐBÑBÔBÐBÙØ�aŠ<ˆ<Ø%)¨#¨y°¨y¨.Ô%9ˆAˆh˜	˜˜	Ð!Ñ"ÝÔ#Ø�)�8�)˜Y˜h˜YÐ&Ô'Ø�(˜I˜X˜IÐ%Ô&ØØØ Ø"ðñ ô ð ð ��Q�x  ( Ð*Ô+Ñ,Ô,°Ñ1ˆAØ�s˜C�x”. 1Ñ$ˆCØ�iÒÐÝ”�i­ÀAÐFÑFÔFÐFÙÝ$(¨¡I¤IˆAˆh˜Ð Ñ!Ð!å˜4  S œ>Ñ*Ô*ˆAˆd‰Gà$( D¨¨h¬¸¸c¼Ñ$CÔ$CÑ!ˆˆX‰˜˜S™	Ø(,¨¨T¬V°HÔ-=¸t¼vÀc¼{Ñ(KÔ(KÑ%ˆŒˆxÑ˜$œ& ™+Ø*1°#¬,¸ÀÔ8IÐ'ˆ�Ñ˜7 3™<Ø " 3¤¨¨H¬Ðˆˆ8‰�b˜‘gØ�A‰ˆà�5Øˆiˆxˆi˜˜(˜Ð"Ô# R¨	¨¨	¤]¸$ÈEð
ñ 
ô 
‰ˆˆqð ð 	3Ø-2ˆE�)�8�)˜X¨™\Ð)Ñ*ÝŒv�d˜1˜1˜1˜i˜x˜i˜<Ô(¨%Ñ0Ô0ˆØ�T‘	ˆØˆ?Ø˜ÑˆHÝ”H˜U D¨¨(¨¤OÑ4Ô4ˆEØ˜ÑˆHÝ�8‰}Œ} Ò#Ð#Øð $à˜Ò%Ð%Øñ[-ð^ ð 3Ø�g˜i˜x˜iÔ(¨%°°°°9°H°9°Ô*=¸xÐGÐGà�g˜i˜x˜iÔ(¨(Ð2Ð2rT   z
array-likeÚleft©ÚclosedÚbooleanÚauto)r?   r@   rA   rB   Ú
precomputerC   rD   Úreturn_n_iter©Úprefer_skip_nested_validation)rA   rB   ri   rC   rD   rj   c          
      ól  — t          | d|¬¦  «        } d}|j        dk    r|                     dd¦  «        }t          |¦  «        }|j        d         dk    rd}|€-|€+t	          t          d| j        d         z  ¦  «        d¦  «        }|€ || j        d         k    rt          d	¦  «        ‚|d
k    r| j        d         | j        d         k    }|r}t          j        | j	        | ¦  «        }t          j
        |¦  «        }t          j        | j	        |¦  «        }	|�t          j        |dz  d¬¦  «        }
nd}
t          ||	|||
|d|¬¦  «        S |r9t          j        | j        d         |j        d         | j        d         f¦  «        }n,t          j        | j        d         |j        d         f¦  «        }g }t          |j        d         ¦  «        D ]£}t          | |dd…|f         ||||¬¦  «        }|r^|\  }}}}|dd…dd…dt!          |¦  «        …f         }t#          |j	        ¦  «        D ]#\  }}|d|dz   …         ||d|dz   …         ||f<   Œ$n|\  }}}||||f<   |                     |¦  «         Œ¤|j        d         dk    r|d         }|rt          j        |¦  «        |fS t          j        |¦  «        S )a1  Orthogonal Matching Pursuit (OMP).

    Solves n_targets Orthogonal Matching Pursuit problems.
    An instance of the problem has the form:

    When parametrized by the number of non-zero coefficients using
    `n_nonzero_coefs`:
    argmin ||y - X\gamma||^2 subject to ||\gamma||_0 <= n_{nonzero coefs}

    When parametrized by error using the parameter `tol`:
    argmin ||\gamma||_0 subject to ||y - X\gamma||^2 <= tol

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

    Parameters
    ----------
    X : array-like of shape (n_samples, n_features)
        Input data. Columns are assumed to have unit norm.

    y : ndarray of shape (n_samples,) or (n_samples, n_targets)
        Input targets.

    n_nonzero_coefs : int, default=None
        Desired number of non-zero entries in the solution. If None (by
        default) this value is set to 10% of n_features.

    tol : float, default=None
        Maximum squared norm of the residual. If not None, overrides n_nonzero_coefs.

    precompute : 'auto' or bool, default=False
        Whether to perform precomputations. Improves performance when n_targets
        or n_samples is very large.

    copy_X : bool, default=True
        Whether the design matrix X must be copied by the algorithm. A false
        value is only helpful if X is already Fortran-ordered, otherwise a
        copy is made anyway.

    return_path : bool, default=False
        Whether to return every value of the nonzero coefficients along the
        forward path. Useful for cross-validation.

    return_n_iter : bool, default=False
        Whether or not to return the number of iterations.

    Returns
    -------
    coef : ndarray of shape (n_features,) or (n_features, n_targets)
        Coefficients of the OMP solution. If `return_path=True`, this contains
        the whole coefficient path. In this case its shape is
        (n_features, n_features) or (n_features, n_targets, n_features) and
        iterating over the last axis generates coefficients in increasing order
        of active features.

    n_iters : array-like or int
        Number of active features across every target. Returned only if
        `return_n_iter` is set to True.

    See Also
    --------
    OrthogonalMatchingPursuit : Orthogonal Matching Pursuit model.
    orthogonal_mp_gram : Solve OMP problems using Gram matrix and the product X.T * y.
    lars_path : Compute Least Angle Regression or Lasso path using LARS algorithm.
    sklearn.decomposition.sparse_encode : Sparse coding.

    Notes
    -----
    Orthogonal matching pursuit was introduced in S. Mallat, Z. Zhang,
    Matching pursuits with time-frequency dictionaries, IEEE Transactions on
    Signal Processing, Vol. 41, No. 12. (December 1993), pp. 3397-3415.
    (https://www.di.ens.fr/~mallat/papiers/MallatPursuit93.pdf)

    This implementation is based on Rubinstein, R., Zibulevsky, M. and Elad,
    M., Efficient Implementation of the K-SVD Algorithm using Batch Orthogonal
    Matching Pursuit Technical Report - CS Technion, April 2008.
    https://www.cs.technion.ac.il/~ronrubin/Publications/KSVD-OMP-v2.pdf
    r   ©Úorderr+   Fr   éÿÿÿÿTNçš™™™™™¹?ú>The number of atoms cannot be more than the number of featuresrh   r   r   ©Úaxis)rA   rB   Únorms_squaredr^   r_   rD   )rC   rD   )r   ÚndimÚreshaper5   ÚmaxÚintÚ
ValueErrorr,   r1   r2   r-   ÚsumÚorthogonal_mp_gramÚzerosÚrangerS   rY   Ú	enumerateÚappendÚsqueeze)r?   r@   rA   rB   ri   rC   rD   rj   ÚGr\   ru   ÚcoefÚn_itersÚkÚoutrQ   ÚidxrM   Ún_iterrI   Úxs                        rR   Úorthogonal_mprŠ     s  € õJ 	�A˜S vÐ.Ñ.Ô.€AØ€FØ„v�‚{€{Ø�IŠI�b˜!ÑÔˆÝ�A‰Œ€AØ„wˆq„z�A‚~€~ØˆØÐ 3 ;õ �c #¨¬°¬
Ñ"2Ñ3Ô3°QÑ7Ô7ˆØ
€{�¨¬°¬Ò3Ð3ÝØLñ
ô 
ð 	
ð �VÒÐØ”W˜Q”Z !¤'¨!¤*Ò,ˆ
Øð 
ÝŒF�1”3˜‰NŒNˆÝÔ˜aÑ Ô ˆÝŒV�A”C˜‰^Œ^ˆØˆ?ÝœF A q¡D°Ð2Ñ2Ô2ˆMˆMà ˆMÝ!ØØØ+ØØ'ØØØ#ð	
ñ 	
ô 	
ð 		
ð ð 2ÝŒx˜œ œ Q¤W¨Q¤Z°´¸´Ð<Ñ=Ô=ˆˆåŒx˜œ œ Q¤W¨Q¤ZÐ0Ñ1Ô1ˆØ€Gå�1”7˜1”:ÑÔð ð ˆÝØˆq����A�Œw˜¨°VÈð
ñ 
ô 
ˆð ð 	Ø$'Ñ!ˆAˆs�E˜6Ø˜˜˜˜1˜1˜1˜j¥ C¡¤˜jÐ(Ô)ˆDÝ(¨¬Ñ1Ô1ð Kð K‘�˜!Ø9:¸>¸XÈ¹\¸>Ô9J��S˜˜8 a™<˜Ô(¨!¨XÐ5Ñ6Ð6ðKð !‰NˆAˆs�FØˆD��a�‰LØ�Š�vÑÔÐÐà„wˆq„z�Q‚€Ø˜!”*ˆàð  ÝŒz˜$ÑÔ Ð(Ð(åŒz˜$ÑÔÐrT   )rA   rB   ru   r^   r_   rD   rj   c                óB  — t          | d|¬¦  «        } t          j        |¦  «        }|j        dk    r|j        d         dk    rd}|j        dk    r|dd…t          j        f         }|�|g}|s|j        j        s|                     ¦   «         }|€!|€t          dt          | ¦  «        z  ¦  «        }|�|€t          d¦  «        ‚|�|dk     rt          d	¦  «        ‚|€|dk    rt          d
¦  «        ‚|€"|t          | ¦  «        k    rt          d¦  «        ‚|rDt          j        t          | ¦  «        |j        d         t          | ¦  «        f| j        ¬¦  «        }	n5t          j        t          | ¦  «        |j        d         f| j        ¬¦  «        }	g }
t          |j        d         ¦  «        D ]¯}t          | |dd…|f         ||�||         nd||d|¬¦  «        }|r^|\  }}}}|	dd…dd…dt          |¦  «        …f         }	t!          |j        ¦  «        D ]#\  }}|d|dz   …         |	|d|dz   …         ||f<   Œ$n|\  }}}||	||f<   |
                     |¦  «         Œ°|j        d         dk    r|
d         }
|rt          j        |	¦  «        |
fS t          j        |	¦  «        S )a  Gram Orthogonal Matching Pursuit (OMP).

    Solves n_targets Orthogonal Matching Pursuit problems using only
    the Gram matrix X.T * X and the product X.T * y.

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

    Parameters
    ----------
    Gram : ndarray of shape (n_features, n_features)
        Gram matrix of the input data: X.T * X.

    Xy : ndarray of shape (n_features,) or (n_features, n_targets)
        Input targets multiplied by X: X.T * y.

    n_nonzero_coefs : int, default=None
        Desired number of non-zero entries in the solution. If None (by
        default) this value is set to 10% of n_features.

    tol : float, default=None
        Maximum squared norm of the residual. If not `None`,
        overrides `n_nonzero_coefs`.

    norms_squared : array-like of shape (n_targets,), default=None
        Squared L2 norms of the lines of y. Required if tol is not None.

    copy_Gram : bool, default=True
        Whether the gram matrix must be copied by the algorithm. A false
        value is only helpful if it is already Fortran-ordered, otherwise a
        copy is made anyway.

    copy_Xy : bool, default=True
        Whether the covariance vector Xy must be copied by the algorithm.
        If False, it may be overwritten.

    return_path : bool, default=False
        Whether to return every value of the nonzero coefficients along the
        forward path. Useful for cross-validation.

    return_n_iter : bool, default=False
        Whether or not to return the number of iterations.

    Returns
    -------
    coef : ndarray of shape (n_features,) or (n_features, n_targets)
        Coefficients of the OMP solution. If `return_path=True`, this contains
        the whole coefficient path. In this case its shape is
        (n_features, n_features) or (n_features, n_targets, n_features) and
        iterating over the last axis yields coefficients in increasing order
        of active features.

    n_iters : array-like or int
        Number of active features across every target. Returned only if
        `return_n_iter` is set to True.

    See Also
    --------
    OrthogonalMatchingPursuit : Orthogonal Matching Pursuit model (OMP).
    orthogonal_mp : Solves n_targets Orthogonal Matching Pursuit problems.
    lars_path : Compute Least Angle Regression or Lasso path using
        LARS algorithm.
    sklearn.decomposition.sparse_encode : Generic sparse coding.
        Each column of the result is the solution to a Lasso problem.

    Notes
    -----
    Orthogonal matching pursuit was introduced in G. Mallat, Z. Zhang,
    Matching pursuits with time-frequency dictionaries, IEEE Transactions on
    Signal Processing, Vol. 41, No. 12. (December 1993), pp. 3397-3415.
    (https://www.di.ens.fr/~mallat/papiers/MallatPursuit93.pdf)

    This implementation is based on Rubinstein, R., Zibulevsky, M. and Elad,
    M., Efficient Implementation of the K-SVD Algorithm using Batch Orthogonal
    Matching Pursuit Technical Report - CS Technion, April 2008.
    https://www.cs.technion.ac.il/~ronrubin/Publications/KSVD-OMP-v2.pdf
    r   rn   r   TNrq   zSGram OMP needs the precomputed norms in order to evaluate the error sum of squares.r   zEpsilon cannot be negativez$The number of atoms must be positiverr   r    F)r^   r_   rD   )r   r,   Úasarrayrv   r5   ÚnewaxisrW   rX   r+   ry   rY   rz   r}   r!   r~   rc   r   r2   r€   r�   )r[   r\   rA   rB   ru   r^   r_   rD   rj   rƒ   r„   r…   r†   rQ   r‡   rM   rˆ   rI   r‰   s                      rR   r|   r|   Â  s  € õp �t 3¨YÐ7Ñ7Ô7€DÝ	Œ�B‰Œ€BØ	„w�‚{€{�r”x ”{ Q’�àˆ	Ø	„w�!‚|€|Ø���•2”:�ÔˆØˆ?Ø*˜OˆMØð �b”hÔ(ð à�WŠW‰YŒYˆàÐ 3 ;Ý˜c¥C¨¡I¤I™oÑ.Ô.ˆØ
€˜=Ð0Ýð4ñ
ô 
ð 	
ð €˜3 š7˜7ÝÐ5Ñ6Ô6Ð6Ø
€{�¨!Ò+Ð+ÝÐ?Ñ@Ô@Ð@Ø
€{�­¨T©¬Ò2Ð2ÝØLñ
ô 
ð 	
ð ð DÝŒx�˜T™œ B¤H¨Q¤Kµ°T±´Ð;À4Ä:ÐNÑNÔNˆˆåŒx�˜T™œ B¤H¨Q¤KÐ0¸¼
ÐCÑCÔCˆà€GÝ�2”8˜A”;ÑÔð ð ˆÝØØˆqˆqˆq�!ˆtŒHØØ # ˆM˜!ÔÐ°TØØØØ#ð	
ñ 	
ô 	
ˆð ð 	Ø$'Ñ!ˆAˆs�E˜6Ø˜˜˜˜1˜1˜1˜j¥ C¡¤˜jÐ(Ô)ˆDÝ(¨¬Ñ1Ô1ð Kð K‘�˜!Ø9:¸>¸XÈ¹\¸>Ô9J��S˜˜8 a™<˜Ô(¨!¨XÐ5Ñ6Ð6ðKð !‰NˆAˆs�FØˆD��a�‰LØ�Š�vÑÔÐÐà	„x�„{�aÒÐØ˜!”*ˆàð  ÝŒz˜$ÑÔ Ð(Ð(åŒz˜$ÑÔÐrT   c            	       óì   — e Zd ZU dZ eeddd¬¦  «        dg eeddd¬¦  «        dgdgd e edh¦  «        ¦  «        g ed	h¦  «        dgd
œZ	e
ed<   ddddd	d
œd„Z ed¬¦  «        d„ ¦   «         ZdS )ÚOrthogonalMatchingPursuitaÿ  Orthogonal Matching Pursuit model (OMP).

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

    Parameters
    ----------
    n_nonzero_coefs : int, default=None
        Desired number of non-zero entries in the solution. If None (by
        default) this value is set to 10% of n_features.

    tol : float, default=None
        Maximum squared norm of the residual. If not None, overrides n_nonzero_coefs.

    fit_intercept : bool, default=True
        Whether to calculate the intercept for this model. If set
        to false, no intercept will be used in calculations
        (i.e. data is expected to be centered).

    normalize : bool, default=False
        This parameter is ignored when ``fit_intercept`` is set to False.
        If True, the regressors X will be normalized before regression by
        subtracting the mean and dividing by the l2-norm.
        If you wish to standardize, please use
        :class:`~sklearn.preprocessing.StandardScaler` before calling ``fit``
        on an estimator with ``normalize=False``.

        .. versionchanged:: 1.2
           default changed from True to False in 1.2.

        .. deprecated:: 1.2
            ``normalize`` was deprecated in version 1.2 and will be removed in 1.4.

    precompute : 'auto' or bool, default='auto'
        Whether to use a precomputed Gram and Xy matrix to speed up
        calculations. Improves performance when :term:`n_targets` or
        :term:`n_samples` is very large. Note that if you already have such
        matrices, you can pass them directly to the fit method.

    Attributes
    ----------
    coef_ : ndarray of shape (n_features,) or (n_targets, n_features)
        Parameter vector (w in the formula).

    intercept_ : float or ndarray of shape (n_targets,)
        Independent term in decision function.

    n_iter_ : int or array-like
        Number of active features across every target.

    n_nonzero_coefs_ : int
        The number of non-zero coefficients in the solution. If
        `n_nonzero_coefs` is None and `tol` is None this value is either set
        to 10% of `n_features` or 1, whichever is greater.

    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
    --------
    orthogonal_mp : Solves n_targets Orthogonal Matching Pursuit problems.
    orthogonal_mp_gram :  Solves n_targets Orthogonal Matching Pursuit
        problems using only the Gram matrix X.T * X and the product X.T * y.
    lars_path : Compute Least Angle Regression or Lasso path using LARS algorithm.
    Lars : Least Angle Regression model a.k.a. LAR.
    LassoLars : Lasso model fit with Least Angle Regression a.k.a. Lars.
    sklearn.decomposition.sparse_encode : Generic sparse coding.
        Each column of the result is the solution to a Lasso problem.
    OrthogonalMatchingPursuitCV : Cross-validated
        Orthogonal Matching Pursuit model (OMP).

    Notes
    -----
    Orthogonal matching pursuit was introduced in G. Mallat, Z. Zhang,
    Matching pursuits with time-frequency dictionaries, IEEE Transactions on
    Signal Processing, Vol. 41, No. 12. (December 1993), pp. 3397-3415.
    (https://www.di.ens.fr/~mallat/papiers/MallatPursuit93.pdf)

    This implementation is based on Rubinstein, R., Zibulevsky, M. and Elad,
    M., Efficient Implementation of the K-SVD Algorithm using Batch Orthogonal
    Matching Pursuit Technical Report - CS Technion, April 2008.
    https://www.cs.technion.ac.il/~ronrubin/Publications/KSVD-OMP-v2.pdf

    Examples
    --------
    >>> from sklearn.linear_model import OrthogonalMatchingPursuit
    >>> from sklearn.datasets import make_regression
    >>> X, y = make_regression(noise=4, random_state=0)
    >>> reg = OrthogonalMatchingPursuit().fit(X, y)
    >>> reg.score(X, y)
    0.9991...
    >>> reg.predict(X[:1,])
    array([-78.3854...])
    r   Nrd   re   r   rg   Ú
deprecatedrh   ©rA   rB   Úfit_interceptÚ	normalizeri   Ú_parameter_constraintsTc                óL   — || _         || _        || _        || _        || _        d S ©Nr‘   )ÚselfrA   rB   r’   r“   ri   s         rR   Ú__init__z"OrthogonalMatchingPursuit.__init__Ê  s-   € ð  /ˆÔØˆŒØ*ˆÔØ"ˆŒØ$ˆŒˆˆrT   rk   c           
      óà  — t          | j        | j        j        ¬¦  «        }|                      ||dd¬¦  «        \  }}|j        d         }t          ||d| j        || j        d¬¦  «        \  }}}}}}}	|j	        dk    r|dd…t          j        f         }| j        €-| j        €&t          t          d|z  ¦  «        d¦  «        | _        n| j        | _        |du r)t#          ||| j        | j        ddd¬	¦  «        \  }
| _        nK| j        �t          j        |d
z  d¬¦  «        nd}t)          ||	| j        | j        |ddd¬¦  «        \  }
| _        |
j        | _        |                      |||¦  «         | S )a˜  Fit the model using X, y as training data.

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

        y : array-like of shape (n_samples,) or (n_samples, n_targets)
            Target values. Will be cast to X's dtype if necessary.

        Returns
        -------
        self : object
            Returns an instance of self.
        ©Úestimator_nameT)Úmulti_outputÚ	y_numericr   N©r+   rq   F)rA   rB   ri   rC   rj   r   r   rs   )r\   rA   rB   ru   r^   r_   rj   )r   r“   Ú	__class__Ú__name__Ú_validate_datar5   r   ri   r’   rv   r,   r�   rA   rB   rx   ry   Ún_nonzero_coefs_rŠ   Ún_iter_r{   r|   r2   Úcoef_Ú_set_intercept)r—   r?   r@   Ú
_normalizeÚ
n_featuresÚX_offsetÚy_offsetÚX_scaler[   r\   r¤   Únorms_sqs               rR   ÚfitzOrthogonalMatchingPursuit.fitÙ  s®  € õ" *ØŒN¨4¬>Ô+Bð
ñ 
ô 
ˆ
ð ×"Ò" 1 a°dÀdÐ"ÑKÔK‰ˆˆ1Ø”W˜Q”Zˆ
å6>Øˆq�$˜œ¨°TÔ5GÈdð7
ñ 7
ô 7
Ñ3ˆˆ1ˆh˜ '¨4°ð Œ6�QŠ;ˆ;Ø�!�!�!•R”Z�-Ô ˆAàÔÐ'¨D¬HÐ,<õ %(­¨C°*Ñ,<Ñ(=Ô(=¸qÑ$AÔ$AˆDÔ!Ð!à$(Ô$8ˆDÔ!à�5ˆ=ˆ=Ý"/ØØØ $Ô 5Ø”HØ ØØ"ð#ñ #ô #ÑˆE�4”<�<ð 04¬xÐ/C•r”v˜a ™d¨Ð+Ñ+Ô+Ð+ÈˆHå"4ØØØ $Ô 5Ø”HØ&ØØØ"ð	#ñ 	#ô 	#ÑˆE�4”<ð ”WˆŒ
Ø×Ò˜H h°Ñ8Ô8Ð8ØˆrT   )r    Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r”   ÚdictÚ__annotations__r˜   r   r¬   © rT   rR   r�   r�   [  s  € € € € € € ðdð dðN %˜H X¨q°$¸vÐFÑFÔFÈÐMØ�˜˜q $¨vÐ6Ñ6Ô6¸Ð=Ø#˜Ø  ¨
¨
°L°>Ñ(BÔ(BÑ!CÔ!CÐDØ!�z 6 (Ñ+Ô+¨YÐ7ð$ð $Ð˜Dð ð ñ ð ØØØØð%ð %ð %ð %ð %ð €\°Ð5Ñ5Ô5ð>ð >ñ 6Ô5ð>ð >ð >rT   r�   éd   c           	      ó.  — |rP|                       ¦   «         } |                      ¦   «         }|                      ¦   «         }|                      ¦   «         }|rb|                      d¬¦  «        }| |z  } ||z  }|                     d¬¦  «        }	t          |d¬¦  «        }||	z  }t          |d¬¦  «        }||	z  }|rYt          j        t          j        | dz  d¬¦  «        ¦  «        }
t          j        |
¦  «        }| dd…|fxx         |
|         z  cc<   t          | ||dddd¬¦  «        }|j        d	k    r|dd…t          j	        f         }|r*||xx         |
|         dd…t          j	        f         z  cc<   t          j
        |j        |j        ¦  «        |z
  S )
aÅ  Compute the residues on left-out data for a full LARS path.

    Parameters
    ----------
    X_train : ndarray of shape (n_samples, n_features)
        The data to fit the LARS on.

    y_train : ndarray of shape (n_samples)
        The target variable to fit LARS on.

    X_test : ndarray of shape (n_samples, n_features)
        The data to compute the residues on.

    y_test : ndarray of shape (n_samples)
        The target variable to compute the residues on.

    copy : bool, default=True
        Whether X_train, X_test, y_train and y_test should be copied.  If
        False, they may be overwritten.

    fit_intercept : bool, default=True
        Whether to calculate the intercept for this model. If set
        to false, no intercept will be used in calculations
        (i.e. data is expected to be centered).

    normalize : bool, default=False
        This parameter is ignored when ``fit_intercept`` is set to False.
        If True, the regressors X will be normalized before regression by
        subtracting the mean and dividing by the l2-norm.
        If you wish to standardize, please use
        :class:`~sklearn.preprocessing.StandardScaler` before calling ``fit``
        on an estimator with ``normalize=False``.

        .. versionchanged:: 1.2
           default changed from True to False in 1.2.

        .. deprecated:: 1.2
            ``normalize`` was deprecated in version 1.2 and will be removed in 1.4.

    max_iter : int, default=100
        Maximum numbers of iterations to perform, therefore maximum features
        to include. 100 by default.

    Returns
    -------
    residues : ndarray of shape (n_samples, max_features)
        Residues of the prediction on the test data.
    r   rs   Frž   r   NT)rA   rB   ri   rC   rD   r   )r+   Úmeanr   r,   r   r{   ÚflatnonzerorŠ   rv   r�   r1   r2   )ÚX_trainÚy_trainÚX_testÚy_testr+   r’   r“   Úmax_iterÚX_meanÚy_meanÚnormsÚnonzerosrM   s                rR   Ú_omp_path_residuesrÀ     s²  € ðv ð Ø—,’,‘.”.ˆØ—,’,‘.”.ˆØ—’‘”ˆØ—’‘”ˆàð Ø—’ 1�Ñ%Ô%ˆØ�6ÑˆØ�&ÑˆØ—’ 1�Ñ%Ô%ˆÝ  ¨uÐ5Ñ5Ô5ˆØ�6ÑˆÝ ¨UÐ3Ñ3Ô3ˆØ�&Ñˆàð 0Ý”�œ˜w¨™z°Ð2Ñ2Ô2Ñ3Ô3ˆÝ”> %Ñ(Ô(ˆØ����8�ÐÐÔ  h¤Ñ/ÐÐÑåØØØ ØØØØðñ ô €Eð „z�Q‚€Ø�a�a�a�œ�mÔ$ˆØð :ØˆhˆˆŒ˜5 œ?¨1¨1¨1­b¬j¨=Ô9Ñ9ˆˆ‰åŒ6�%”'˜6œ8Ñ$Ô$ vÑ-Ð-rT   c            	       óÈ   — e Zd ZU dZdgdgd e edh¦  «        ¦  «        g eeddd¬¦  «        dgdgedgd	gd
œZe	e
d<   dddddddd
œd„Z ed¬¦  «        d„ ¦   «         ZdS )ÚOrthogonalMatchingPursuitCVaß  Cross-validated Orthogonal Matching Pursuit model (OMP).

    See glossary entry for :term:`cross-validation estimator`.

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

    Parameters
    ----------
    copy : bool, default=True
        Whether the design matrix X must be copied by the algorithm. A false
        value is only helpful if X is already Fortran-ordered, otherwise a
        copy is made anyway.

    fit_intercept : bool, default=True
        Whether to calculate the intercept for this model. If set
        to false, no intercept will be used in calculations
        (i.e. data is expected to be centered).

    normalize : bool, default=False
        This parameter is ignored when ``fit_intercept`` is set to False.
        If True, the regressors X will be normalized before regression by
        subtracting the mean and dividing by the l2-norm.
        If you wish to standardize, please use
        :class:`~sklearn.preprocessing.StandardScaler` before calling ``fit``
        on an estimator with ``normalize=False``.

        .. versionchanged:: 1.2
           default changed from True to False in 1.2.

        .. deprecated:: 1.2
            ``normalize`` was deprecated in version 1.2 and will be removed in 1.4.

    max_iter : int, default=None
        Maximum numbers of iterations to perform, therefore maximum features
        to include. 10% of ``n_features`` but at least 5 if available.

    cv : int, cross-validation generator or iterable, default=None
        Determines the cross-validation splitting strategy.
        Possible inputs for cv are:

        - None, to use the default 5-fold cross-validation,
        - integer, to specify the number of folds.
        - :term:`CV splitter`,
        - An iterable yielding (train, test) splits as arrays of indices.

        For integer/None inputs, :class:`~sklearn.model_selection.KFold` is used.

        Refer :ref:`User Guide <cross_validation>` for the various
        cross-validation strategies that can be used here.

        .. versionchanged:: 0.22
            ``cv`` default value if None changed from 3-fold to 5-fold.

    n_jobs : int, default=None
        Number of CPUs to use during the cross validation.
        ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
        ``-1`` means using all processors. See :term:`Glossary <n_jobs>`
        for more details.

    verbose : bool or int, default=False
        Sets the verbosity amount.

    Attributes
    ----------
    intercept_ : float or ndarray of shape (n_targets,)
        Independent term in decision function.

    coef_ : ndarray of shape (n_features,) or (n_targets, n_features)
        Parameter vector (w in the problem formulation).

    n_nonzero_coefs_ : int
        Estimated number of non-zero coefficients giving the best mean squared
        error over the cross-validation folds.

    n_iter_ : int or array-like
        Number of active features across every target for the model refit with
        the best hyperparameters got by cross-validating across all folds.

    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
    --------
    orthogonal_mp : Solves n_targets Orthogonal Matching Pursuit problems.
    orthogonal_mp_gram : Solves n_targets Orthogonal Matching Pursuit
        problems using only the Gram matrix X.T * X and the product X.T * y.
    lars_path : Compute Least Angle Regression or Lasso path using LARS algorithm.
    Lars : Least Angle Regression model a.k.a. LAR.
    LassoLars : Lasso model fit with Least Angle Regression a.k.a. Lars.
    OrthogonalMatchingPursuit : Orthogonal Matching Pursuit model (OMP).
    LarsCV : Cross-validated Least Angle Regression model.
    LassoLarsCV : Cross-validated Lasso model fit with Least Angle Regression.
    sklearn.decomposition.sparse_encode : Generic sparse coding.
        Each column of the result is the solution to a Lasso problem.

    Notes
    -----
    In `fit`, once the optimal number of non-zero coefficients is found through
    cross-validation, the model is fit again using the entire training set.

    Examples
    --------
    >>> from sklearn.linear_model import OrthogonalMatchingPursuitCV
    >>> from sklearn.datasets import make_regression
    >>> X, y = make_regression(n_features=100, n_informative=10,
    ...                        noise=4, random_state=0)
    >>> reg = OrthogonalMatchingPursuitCV(cv=5).fit(X, y)
    >>> reg.score(X, y)
    0.9991...
    >>> reg.n_nonzero_coefs_
    10
    >>> reg.predict(X[:1,])
    array([-78.3854...])
    rg   r�   r   Nrd   re   Ú	cv_objectÚverbose©r+   r’   r“   r»   ÚcvÚn_jobsrÄ   r”   TFc                óh   — || _         || _        || _        || _        || _        || _        || _        d S r–   rÅ   )r—   r+   r’   r“   r»   rÆ   rÇ   rÄ   s           rR   r˜   z$OrthogonalMatchingPursuitCV.__init__  s:   € ð ˆŒ	Ø*ˆÔØ"ˆŒØ ˆŒØˆŒØˆŒØˆŒˆˆrT   rk   c           	      ó  ‡ ‡‡‡‡	‡
— t          ‰ j        ‰ j        j        ¬¦  «        Š‰                      ‰‰dd¬¦  «        \  ŠŠt          ‰dd¬¦  «        Št          ‰ j        d¬¦  «        }‰ j        sDt          t          t          d‰j        d	         z  ¦  «        d
¦  «        ‰j        d	         ¦  «        n‰ j        Š	 t          ‰ j        ‰ j        ¬¦  «        ˆˆˆ	ˆ ˆfd„|                     ‰¦  «        D ¦   «         ¦  «        }t          d„ |D ¦   «         ¦  «        Š
t#          j        ˆ
fd„|D ¦   «         ¦  «        }t#          j        |                     d¬¦  «        ¦  «        d	z   }|‰ _        t-          |‰ j        ‰¬¦  «        }t1          j        ¦   «         5  t1          j        dt6          ¬¦  «         |                     ‰‰¦  «         ddd¦  «         n# 1 swxY w Y   |j        ‰ _        |j        ‰ _        |j        ‰ _        ‰ S )a~  Fit the model using X, y as training data.

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

        y : array-like of shape (n_samples,)
            Target values. Will be cast to X's dtype if necessary.

        Returns
        -------
        self : object
            Returns an instance of self.
        rš   Tr   )r�   Úensure_min_featuresF)r+   Úforce_all_finite)Ú
classifierrq   r   é   )rÇ   rÄ   c              3   óª   •K  — | ]M\  }} t          t          ¦  «        ‰|         ‰|         ‰|         ‰|         ‰j        ‰j        ‰‰¦  «        V — ŒNd S r–   )r   rÀ   r+   r’   )Ú.0ÚtrainÚtestr?   r¦   r»   r—   r@   s      €€€€€rR   ú	<genexpr>z2OrthogonalMatchingPursuitCV.fit.<locals>.<genexpr>2  s‡   øè è € ð F
ð F
ñ ��tð (�GÕ&Ñ'Ô'Ø�%”Ø�%”Ø�$”Ø�$”Ø”	ØÔ"ØØñ	ô 	ðF
ð F
ð F
ð F
ð F
ð F
rT   c              3   ó0   K  — | ]}|j         d          V — ŒdS )r   N)r5   )rÏ   Úfolds     rR   rÒ   z2OrthogonalMatchingPursuitCV.fit.<locals>.<genexpr>@  s(   è è € Ð@Ð@¨t˜TœZ¨œ]Ð@Ð@Ð@Ð@Ð@Ð@rT   c                 óR   •— g | ]#}|d ‰…         dz                        d¬¦  «        ‘Œ$S )Nr   r   rs   )rµ   )rÏ   rÔ   Úmin_early_stops     €rR   ú
<listcomp>z3OrthogonalMatchingPursuitCV.fit.<locals>.<listcomp>B  s8   ø€ ÐLÐLÐL¸4ˆd�?�N�?Ô# qÑ(×.Ò.°AÐ.Ñ6Ô6ÐLÐLÐLrT   r   rs   )rA   r’   r“   Úignore)ÚcategoryN) r   r“   rŸ   r    r¡   r   r   rÆ   r»   Úminrx   ry   r5   r   rÇ   rÄ   Úsplitr,   ÚarrayÚargminrµ   r¢   r�   r’   r9   Úcatch_warningsÚfilterwarningsÚFutureWarningr¬   r¤   Ú
intercept_r£   )r—   r?   r@   rÆ   Úcv_pathsÚ	mse_foldsÚbest_n_nonzero_coefsÚompr¦   r»   rÖ   s   ```     @@@rR   r¬   zOrthogonalMatchingPursuitCV.fit  st  øøøøøø€ õ" *ØŒN¨4¬>Ô+Bð
ñ 
ô 
ˆ
ð ×"Ò" 1 a°4ÈQÐ"ÑOÔO‰ˆˆ1Ý˜1 5¸5ÐAÑAÔAˆÝ�d”g¨%Ð0Ñ0Ô0ˆð ”=ð�C••C˜˜aœg aœjÑ(Ñ)Ô)¨1Ñ-Ô-¨q¬w°q¬zÑ:Ô:Ð:à”ð 	ð
 F•8 4¤;¸¼ÐEÑEÔEð F
ð F
ð F
ð F
ð F
ð F
ð F
ð F
ð  "Ÿxšx¨™{œ{ðF
ñ F
ô F
ñ 
ô 
ˆõ Ð@Ð@°xÐ@Ñ@Ô@Ñ@Ô@ˆÝ”HØLÐLÐLÐLÀ8ÐLÑLÔLñ
ô 
ˆ	õ  "œy¨¯ª¸Q¨Ñ)?Ô)?Ñ@Ô@À1ÑDÐØ 4ˆÔÝ'Ø0ØÔ,Ø ð
ñ 
ô 
ˆõ Ô$Ñ&Ô&ð 	ð 	ÝÔ# Hµ}ÐEÑEÔEÐEØ�GŠG�A�q‰MŒMˆMð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð ”YˆŒ
Øœ.ˆŒØ”{ˆŒØˆs   Æ2GÇGÇG)r    r­   r®   r¯   r   r   r   r   r”   r°   r±   r˜   r   r¬   r²   rT   rR   rÂ   rÂ   |  sñ   € € € € € € ðyð yðx �Ø#˜Ø  ¨
¨
°L°>Ñ(BÔ(BÑ!CÔ!CÐDØ�X˜h¨¨4¸Ð?Ñ?Ô?ÀÐFØˆmØ˜TÐ"Ø�;ð$ð $Ð˜Dð ð ñ ð ØØØØØØðð ð ð ð ð& €\°Ð5Ñ5Ô5ð>ð >ñ 6Ô5ð>ð >ð >rT   rÂ   )NTF)NNTTF)TTFr³   )+r¯   r9   Úmathr   Únumbersr   r   Únumpyr,   Úscipyr   Úscipy.linalg.lapackr   Úbaser	   r
   r   Úmodel_selectionr   Úutilsr   r   Úutils._param_validationr   r   r   r   Úutils.parallelr   r   Ú_baser   r   r   r;   rS   rc   ÚndarrayrŠ   r|   r�   rÀ   rÂ   r²   rT   rR   ú<module>rò      sÿ  ððð ð €€€Ø Ð Ð Ð Ð Ð Ø "Ð "Ð "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø 0Ð 0Ð 0Ð 0Ð 0Ð 0à AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AØ &Ð &Ð &Ð &Ð &Ð &Ø /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ø SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SÐ SØ .Ð .Ð .Ð .Ð .Ð .Ð .Ð .Ø >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ð >Ð >ðð 
ðq3ð q3ð q3ð q3ðp ØØØØðG3ð G3ð G3ð G3ðT €àˆ^ØŒjˆ\Ø$˜H X¨q°$¸vÐFÑFÔFÈÐMØ�˜˜q $¨vÐ6Ñ6Ô6¸Ð=Ø  * *¨f¨XÑ"6Ô"6Ð7Ø�+Ø!�{Ø#˜ð	ð 	ð #'ðñ ô ð" ØØØØØðV ð V ð V ð V ñô ðV ðz ØØØØØØðV ð V ð V ð V ð V ðr}ð }ð }ð }ð }Ð 0°.À+ñ }ô }ð }ðJ 
ØØØð^.ð ^.ð ^.ð ^.ðBXð Xð Xð Xð X .°+ñ Xô Xð Xð Xð XrT   