
    -i                        S r / SQr " S S\5      r " S S\\5      r " S S\5      r " S S	\5      r " S
 S\5      r	 " S S\5      r
 " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      rg)z4Custom warnings and errors used across scikit-learn.)ConvergenceWarningDataConversionWarningDataDimensionalityWarningEfficiencyWarningEstimatorCheckFailedWarningFitFailedWarningNotFittedErrorPositiveSpectrumWarningSkipTestWarningUndefinedMetricWarningUnsetMetadataPassedErrorc                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )r      a  Exception class to raise if a metadata is passed which is not explicitly         requested (metadata=True) or not requested (metadata=False).

.. versionadded:: 1.3

Parameters
----------
message : str
    The message

unrequested_params : dict
    A dictionary of parameters and their values which are provided but not
    requested.

routed_params : dict
    A dictionary of routed parameters.
c                <   > [         TU ]  U5        X l        X0l        g N)super__init__unrequested_paramsrouted_params)selfmessager   r   	__class__s       E/var/www/html/venv/lib/python3.13/site-packages/sklearn/exceptions.pyr   !UnsetMetadataPassedError.__init__(   s    !"4*    )r   r   )__name__
__module____qualname____firstlineno____doc__r   __static_attributes____classcell__)r   s   @r   r   r      s    $+ +r   r   c                       \ rS rSrSrSrg)r   .   a]  Exception class to raise if estimator is used before fitting.

This class inherits from both ValueError and AttributeError to help with
exception handling and backward compatibility.

Examples
--------
>>> from sklearn.svm import LinearSVC
>>> from sklearn.exceptions import NotFittedError
>>> try:
...     LinearSVC().predict([[1, 2], [2, 3], [3, 4]])
... except NotFittedError as e:
...     print(repr(e))
NotFittedError("This LinearSVC instance is not fitted yet. Call 'fit' with
appropriate arguments before using this estimator."...)

.. versionchanged:: 0.18
   Moved from sklearn.utils.validation.
 Nr   r   r   r   r   r    r$   r   r   r   r   .   s    r   r   c                       \ rS rSrSrSrg)r   D   zfCustom warning to capture convergence problems

.. versionchanged:: 0.18
   Moved from sklearn.utils.
r$   Nr%   r$   r   r   r   r   D       r   r   c                       \ rS rSrSrSrg)r   L   ad  Warning used to notify implicit data conversions happening in the code.

This warning occurs when some input data needs to be converted or
interpreted in a way that may not match the user's expectations.

For example, this warning may occur when the user
    - passes an integer array to a function which expects float input and
      will convert the input
    - requests a non-copying operation, but a copy is required to meet the
      implementation's data-type expectations;
    - passes an input whose shape can be interpreted ambiguously.

.. versionchanged:: 0.18
   Moved from sklearn.utils.validation.
r$   Nr%   r$   r   r   r   r   L   s    r   r   c                       \ rS rSrSrSrg)r   ^   a  Custom warning to notify potential issues with data dimensionality.

For example, in random projection, this warning is raised when the
number of components, which quantifies the dimensionality of the target
projection space, is higher than the number of features, which quantifies
the dimensionality of the original source space, to imply that the
dimensionality of the problem will not be reduced.

.. versionchanged:: 0.18
   Moved from sklearn.utils.
r$   Nr%   r$   r   r   r   r   ^   s    
r   r   c                       \ rS rSrSrSrg)r   l   a!  Warning used to notify the user of inefficient computation.

This warning notifies the user that the efficiency may not be optimal due
to some reason which may be included as a part of the warning message.
This may be subclassed into a more specific Warning class.

.. versionadded:: 0.18
r$   Nr%   r$   r   r   r   r   l   s    r   r   c                       \ rS rSrSrSrg)r   w   aI  Warning class used if there is an error while fitting the estimator.

This Warning is used in meta estimators GridSearchCV and RandomizedSearchCV
and the cross-validation helper function cross_val_score to warn when there
is an error while fitting the estimator.

.. versionchanged:: 0.18
   Moved from sklearn.cross_validation.
r$   Nr%   r$   r   r   r   r   w       r   r   c                       \ rS rSrSrSrg)r
      zWarning class used to notify the user of a test that was skipped.

For example, one of the estimator checks requires a pandas import.
If the pandas package cannot be imported, the test will be skipped rather
than register as a failure.
r$   Nr%   r$   r   r   r
   r
      s    r   r
   c                       \ rS rSrSrSrg)r      z^Warning used when the metric is invalid

.. versionchanged:: 0.18
   Moved from sklearn.base.
r$   Nr%   r$   r   r   r   r      r(   r   r   c                       \ rS rSrSrSrg)r	      a{  Warning raised when the eigenvalues of a PSD matrix have issues

This warning is typically raised by ``_check_psd_eigenvalues`` when the
eigenvalues of a positive semidefinite (PSD) matrix such as a gram matrix
(kernel) present significant negative eigenvalues, or bad conditioning i.e.
very small non-zero eigenvalues compared to the largest eigenvalue.

.. versionadded:: 0.22
r$   Nr%   r$   r   r   r	   r	      r1   r   r	   c                   $    \ rS rSrSrS rS rSrg)InconsistentVersionWarning   a  Warning raised when an estimator is unpickled with an inconsistent version.

Parameters
----------
estimator_name : str
    Estimator name.

current_sklearn_version : str
    Current scikit-learn version.

original_sklearn_version : str
    Original scikit-learn version.
c                (    Xl         X l        X0l        g r   )estimator_namecurrent_sklearn_versionoriginal_sklearn_version)r   r<   r=   r>   s       r   r   #InconsistentVersionWarning.__init__   s     -'>$(@%r   c                 V    SU R                    SU R                   SU R                   S3$ )NzTrying to unpickle estimator z from version z when using version z. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations)r<   r>   r=   r   s    r   __str__"InconsistentVersionWarning.__str__   sB    +D,?,?+@ A--. /!99: ;44		
r   )r=   r<   r>   N)r   r   r   r   r   r   rB   r    r$   r   r   r9   r9      s    A

r   r9   c            
       B    \ rS rSrSrS\S\S\S\S\4
S jrS	 r	S
 r
Srg)r      a  Warning raised when an estimator check from the common tests fails.

Parameters
----------
estimator : estimator object
    Estimator instance for which the test failed.

check_name : str
    Name of the check that failed.

exception : Exception
    Exception raised by the failed check.

status : str
    Status of the check.

expected_to_fail : bool
    Whether the check was expected to fail.

expected_to_fail_reason : str
    Reason for the expected failure.

check_name	exceptionstatusexpected_to_failexpected_to_fail_reasonc                L    Xl         X l        X0l        X@l        XPl        X`l        g r   )	estimatorrF   rG   rH   rI   rJ   )r   rL   rF   rG   rH   rI   rJ   s          r   r   $EstimatorCheckFailedWarning.__init__   s$     #$" 0'>$r   c                     U R                   (       a  SU R                   3OSnSU R                   SU R                  < SU SU R                   3$ )NzExpected to fail: zNot expected to failzTest z failed for estimator z.
Expected to fail reason: z
Exception: )rI   rJ   rF   rL   rG   )r   expected_to_fail_strs     r   __repr__$EstimatorCheckFailedWarning.__repr__   sg     $$ !!=!= >?' 	 DOO$$:4>>:L M((<'= >..)+	
r   c                 "    U R                  5       $ r   )rP   rA   s    r   rB   #EstimatorCheckFailedWarning.__str__   s    }}r   )rF   rL   rG   rI   rJ   rH   N)r   r   r   r   r   str	Exceptionboolr   rP   rB   r    r$   r   r   r   r      sH    .? 	?
 ? ? ? "%?"

r   r   N)r   __all__
ValueErrorr   AttributeErrorr   UserWarningr   r   r   r   RuntimeWarningr   r
   r   r	   r9   r   r$   r   r   <module>r\      s    :
+z +2Z , K $  	~ 	k [ 	k 	 
  
F6+ 6r   