ó
    ¦ñ:i¿_  ã                   óà   • S r SSKrSSKJrJr  SSKrSSKJr	  SSK
JrJrJrJrJr  SSKJr  SSKJrJr  SSKJr  SS	KJr  SS
KJr  SSKJrJrJrJrJ r    " S S\\\5      r! " S S\\\5      r"g)z6Dummy estimators that implement simple rules of thumb.é    N)ÚIntegralÚRealé   )ÚBaseEstimatorÚClassifierMixinÚMultiOutputMixinÚRegressorMixinÚ_fit_context)Úcheck_random_state)ÚIntervalÚ
StrOptions)Úclass_distribution)Ú_random_choice_csc)Ú_weighted_percentile)Ú_check_sample_weightÚ_num_samplesÚcheck_arrayÚcheck_consistent_lengthÚcheck_is_fittedc                   óª   ^ • \ rS rSr% Sr\" 1 Sk5      /S/\\SS/S.r\	\
S'   S	SSS.S
 jr\" SS9SS j5       rS rS rS rS rSU 4S jjrSrU =r$ )ÚDummyClassifieré#   aõ  DummyClassifier makes predictions that ignore the input features.

This classifier serves as a simple baseline to compare against other more
complex classifiers.

The specific behavior of the baseline is selected with the `strategy`
parameter.

All strategies make predictions that ignore the input feature values passed
as the `X` argument to `fit` and `predict`. The predictions, however,
typically depend on values observed in the `y` parameter passed to `fit`.

Note that the "stratified" and "uniform" strategies lead to
non-deterministic predictions that can be rendered deterministic by setting
the `random_state` parameter if needed. The other strategies are naturally
deterministic and, once fit, always return the same constant prediction
for any value of `X`.

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

.. versionadded:: 0.13

Parameters
----------
strategy : {"most_frequent", "prior", "stratified", "uniform",             "constant"}, default="prior"
    Strategy to use to generate predictions.

    * "most_frequent": the `predict` method always returns the most
      frequent class label in the observed `y` argument passed to `fit`.
      The `predict_proba` method returns the matching one-hot encoded
      vector.
    * "prior": the `predict` method always returns the most frequent
      class label in the observed `y` argument passed to `fit` (like
      "most_frequent"). ``predict_proba`` always returns the empirical
      class distribution of `y` also known as the empirical class prior
      distribution.
    * "stratified": the `predict_proba` method randomly samples one-hot
      vectors from a multinomial distribution parametrized by the empirical
      class prior probabilities.
      The `predict` method returns the class label which got probability
      one in the one-hot vector of `predict_proba`.
      Each sampled row of both methods is therefore independent and
      identically distributed.
    * "uniform": generates predictions uniformly at random from the list
      of unique classes observed in `y`, i.e. each class has equal
      probability.
    * "constant": always predicts a constant label that is provided by
      the user. This is useful for metrics that evaluate a non-majority
      class.

      .. versionchanged:: 0.24
         The default value of `strategy` has changed to "prior" in version
         0.24.

random_state : int, RandomState instance or None, default=None
    Controls the randomness to generate the predictions when
    ``strategy='stratified'`` or ``strategy='uniform'``.
    Pass an int for reproducible output across multiple function calls.
    See :term:`Glossary <random_state>`.

constant : int or str or array-like of shape (n_outputs,), default=None
    The explicit constant as predicted by the "constant" strategy. This
    parameter is useful only for the "constant" strategy.

Attributes
----------
classes_ : ndarray of shape (n_classes,) or list of such arrays
    Unique class labels observed in `y`. For multi-output classification
    problems, this attribute is a list of arrays as each output has an
    independent set of possible classes.

n_classes_ : int or list of int
    Number of label for each output.

class_prior_ : ndarray of shape (n_classes,) or list of such arrays
    Frequency of each class observed in `y`. For multioutput classification
    problems, this is computed independently for each output.

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

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.

n_outputs_ : int
    Number of outputs.

sparse_output_ : bool
    True if the array returned from predict is to be in sparse CSC format.
    Is automatically set to True if the input `y` is passed in sparse
    format.

See Also
--------
DummyRegressor : Regressor that makes predictions using simple rules.

Examples
--------
>>> import numpy as np
>>> from sklearn.dummy import DummyClassifier
>>> X = np.array([-1, 1, 1, 1])
>>> y = np.array([0, 1, 1, 1])
>>> dummy_clf = DummyClassifier(strategy="most_frequent")
>>> dummy_clf.fit(X, y)
DummyClassifier(strategy='most_frequent')
>>> dummy_clf.predict(X)
array([1, 1, 1, 1])
>>> dummy_clf.score(X, y)
0.75
>   ÚpriorÚuniformÚconstantÚ
stratifiedÚmost_frequentÚrandom_stateú
array-likeN©Ústrategyr   r   Ú_parameter_constraintsr   c                ó(   • Xl         X l        X0l        g ©Nr    )Úselfr!   r   r   s       ÚP/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/sklearn/dummy.pyÚ__init__ÚDummyClassifier.__init__�   s   € Ø ŒØ(ÔØ �ó    T©Úprefer_skip_nested_validationc                 ót  ^^• U R                  USS9  U R                  U l        U R                  S:X  aF  [        R                  " U5      (       a+  UR                  5       n[        R                  " S[        5        [        R                  " U5      U l	        U R                  (       d,  [        R                  " U5      n[        R                  " U5      nUR                  S:X  a  [        R                  " US5      nUR                  S   U l        [#        X5        Ub  [%        X15      nU R                  S:X  a‚  U R&                  c  [)        S5      e[        R                  " [        R                  " U R&                  5      S5      mTR                  S	   U R                   :w  a  [)        S
U R                   -  5      e[+        X#5      u  U l        U l        U l        U R                  S:X  a†  [3        U R                   5       Hm  m[5        UU4S jU R,                  T    5       5      (       a  M-  SR7                  U R&                  U R,                  T   R9                  5       5      n[)        U5      e   U R                   S:X  a<  U R.                  S	   U l        U R,                  S	   U l        U R0                  S	   U l        U $ )a^  Fit the baseline classifier.

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

y : array-like of shape (n_samples,) or (n_samples, n_outputs)
    Target values.

sample_weight : array-like of shape (n_samples,), default=None
    Sample weights.

Returns
-------
self : object
    Returns the instance itself.
F©Úcast_to_ndarrayr   zªA local copy of the target data has been converted to a numpy array. Predicting on sparse target data with the uniform strategy would not save memory and would be slower.r   ©éÿÿÿÿr   r   úMConstant target value has to be specified when the constant strategy is used.r   ú0Constant target value should have shape (%d, 1).c              3   ó:   >#   • U  H  nTT   S    U:H  v •  M     g7f)r   N© )Ú.0Úcr   Úks     €€r&   Ú	<genexpr>Ú&DummyClassifier.fit.<locals>.<genexpr>ê   s    øé € ÐIÒ8H°1˜8 A™; q™>¨QÖ.Ò8Hùs   ƒzrThe constant target value must be present in the training data. You provided constant={}. Possible values are: {}.)Ú_validate_datar!   Ú	_strategyÚspÚissparseÚtoarrayÚwarningsÚwarnÚUserWarningÚsparse_output_ÚnpÚasarrayÚ
atleast_1dÚndimÚreshapeÚshapeÚ
n_outputs_r   r   r   Ú
ValueErrorr   Úclasses_Ú
n_classes_Úclass_prior_ÚrangeÚanyÚformatÚtolist)r%   ÚXÚyÚsample_weightÚerr_msgr   r7   s        @@r&   ÚfitÚDummyClassifier.fit¢   s'  ù€ ð( 	×Ñ˜A¨uÐÑ5àŸ™ˆŒà�>‰>˜YÓ&¬2¯;ª;°q¯>©>Ø—	‘	“ˆAÜ�MŠMð+ô
 ôô !Ÿkšk¨!›nˆÔà×"×"Ü—
’
˜1“ˆAÜ—’˜aÓ ˆAà�6‰6�Q‹;Ü—
’
˜1˜gÓ&ˆAàŸ'™' !™*ˆŒä Ô%àÑ$Ü0°ÓBˆMà�>‰>˜ZÓ'Ø�}‰}Ñ$Ü ð:óð ô
 Ÿ:š:¤b§m¢m°D·M±MÓ&BÀGÓL�Ø—>‘> !Ñ$¨¯©Ó7Ü$ØJØŸ/™/ñ*óð ô
 ?QØó?
Ñ;ˆŒ˜œ¨Ô):ð �>‰>˜ZÓ'Ü˜4Ÿ?™?Ö+�ÜÕI¸¿¹ÀaÒ8HÓI×IÓIð3ç39±6Ø ŸM™M¨4¯=©=¸Ñ+;×+BÑ+BÓ+Dó4ð ô % WÓ-Ð-ñ ,ð �?‰?˜aÓØ"Ÿo™o¨aÑ0ˆDŒOØ ŸM™M¨!Ñ,ˆDŒMØ $× 1Ñ 1°!Ñ 4ˆDÔàˆr)   c           
      ó^  • [        U 5        [        U5      n[        U R                  5      nU R                  nU R
                  nU R                  nU R                  nU R                  S:X  a  U/nU/nU/nU/nU R                  S:X  a$  U R                  U5      nU R                  S:X  a  U/nU R                  (       aÅ  Sn	U R                  S;   a6  U V
s/ s H(  n
[        R                  " U
R                  5       /5      PM*     nn
OeU R                  S:X  a  Un	ORU R                  S:X  a  [        S5      eU R                  S:X  a'  U Vs/ s H  n[        R                  " U/5      PM     nn[!        X%X�R                  5      nU$ U R                  S;   aT  [        R"                  " [%        U R                  5       Vs/ s H  nX]   Xm   R                  5          PM     snUS/5      nGOU R                  S:X  aZ  [        R&                  " [%        U R                  5       Vs/ s H  nX]   WU   R                  SS9   PM     sn5      R(                  nOžU R                  S:X  a[  [%        U R                  5       Vs/ s H  nX]   UR+                  XM   US	9   PM     nn[        R&                  " U5      R(                  nO3U R                  S:X  a#  [        R"                  " U R                  US45      nU R                  S:X  a  [        R,                  " W5      nW$ s  sn
f s  snf s  snf s  snf s  snf )
zóPerform classification on test vectors X.

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

Returns
-------
y : array-like of shape (n_samples,) or (n_samples, n_outputs)
    Predicted target values for X.
r   r   N)r   r   r   zCSparse target prediction is not supported with the uniform strategyr   ©Úaxis©Úsize)r   r   r   r   rL   rK   rM   r   rI   r;   Úpredict_probarB   rC   ÚarrayÚargmaxrJ   r   ÚtilerN   ÚvstackÚTÚrandintÚravel)r%   rR   Ú	n_samplesÚrsrL   rK   rM   r   ÚprobaÚ
class_probÚcpr6   rS   r7   Úrets                  r&   ÚpredictÚDummyClassifier.predictý   sÜ  € ô 	˜Ôô ! “Oˆ	Ü × 1Ñ 1Ó2ˆà—_‘_ˆ
Ø—=‘=ˆØ×(Ñ(ˆØ—=‘=ˆØ�?‰?˜aÓà$˜ˆJØ �zˆHØ(˜>ˆLØ �zˆHà�>‰>˜\Ó)Ø×&Ñ& qÓ)ˆEØ�‰ !Ó#Ø˜�à××ØˆJØ�~‰~Ð!;Ó;Ù>JÓKºl¸œBŸHšH b§i¡i£k ]Ö3¹l�ÐK�à—‘ <Ó/Ø)‘
à—‘ 9Ó,Ü ð:óð ð
 —‘ :Ó-Ù3;Ó<²8¨aœBŸHšH a SžM±8�Ð<ä" 9¸
×DUÑDUÓVˆAð@ ˆð= �~‰~Ð!;Ó;Ü—G’Gô "' t§¡Ô!7óâ!7˜Að !™ L¡O×$:Ñ$:Ó$<Ô=Ù!7ñð  �Nó’ð —‘ <Ó/Ü—I’Iô "' t§¡Ô!7óâ!7˜Að !™ E¨!¡H§O¡O¸ OÐ$;Ô<Ù!7ñó÷
 ‘!ñ ð —‘ 9Ó,ô # 4§?¡?Ô3óâ3˜ð ‘K §
¡
¨:©=¸y 
Ð IÔJÙ3ð ð ô —I’I˜c“N×$Ñ$‘à—‘ :Ó-Ü—G’G˜DŸM™M¨I°q¨>Ó:�à�‰ !Ó#Ü—H’H˜Q“K�àˆùò] Lùò =ùòùòùòs   Ã/LÅ!LÆ9!L È!L%É7!L*c                 óB  • [        U 5        [        U5      n[        U R                  5      nU R                  nU R
                  nU R                  nU R                  nU R                  S:X  a  U/nU/nU/nU/n/ n[        U R                  5       GHv  n	U R                  S:X  aD  Xi   R                  5       n
[        R                  " X$U	   4[        R                  S9nSUSS2U
4'   GOU R                  S:X  a  [        R                  " US45      Xi   -  nOßU R                  S:X  a3  UR!                  SXi   US9nUR#                  [        R                  5      nOœU R                  S	:X  a/  [        R                  " X$U	   4[        R                  S9nX´U	   -  nO]U R                  S
:X  aM  [        R$                  " XY   Xy   :H  5      n
[        R                  " X$U	   4[        R                  S9nSUSS2U
4'   UR'                  W5        GMy     U R                  S:X  a  US   nU$ )aj  
Return probability estimates for the test vectors X.

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

Returns
-------
P : ndarray of shape (n_samples, n_classes) or list of such arrays
    Returns the probability of the sample for each class in
    the model, where classes are ordered arithmetically, for each
    output.
r   r   ©Údtypeç      ð?Nr   r   r[   r   r   r   )r   r   r   r   rL   rK   rM   r   rI   rN   r;   r_   rC   ÚzerosÚfloat64ÚonesÚmultinomialÚastypeÚwhereÚappend)r%   rR   re   rf   rL   rK   rM   r   ÚPr7   ÚindÚouts               r&   r]   ÚDummyClassifier.predict_probaT  sÏ  € ô  	˜Ôô ! “Oˆ	Ü × 1Ñ 1Ó2ˆà—_‘_ˆ
Ø—=‘=ˆØ×(Ñ(ˆØ—=‘=ˆØ�?‰?˜aÓà$˜ˆJØ �zˆHØ(˜>ˆLØ �zˆHàˆÜ�t—‘×'ˆAØ�~‰~ Ó0Ø"‘o×,Ñ,Ó.�Ü—h’h 	°a©=Ð9ÄÇÁÑL�Ø!�’A�s�F“Ø—‘ 7Ó*Ü—g’g˜y¨!˜nÓ-°±Ñ?‘à—‘ <Ó/Ø—n‘n Q¨©¸i�nÐH�Ø—j‘j¤§¡Ó,‘à—‘ 9Ó,Ü—g’g˜y°Q©-Ð8ÄÇ
Á
ÑK�Ø !‘}Ñ$‘à—‘ :Ó-Ü—h’h˜x™{¨h©kÑ9Ó:�Ü—h’h 	°a©=Ð9ÄÇÁÑL�Ø!�’A�s�F‘à�H‰H�S�Mñ+ (ð. �?‰?˜aÓØ�!‘ˆAàˆr)   c                 óÈ   • U R                  U5      nU R                  S:X  a  [        R                  " U5      $ U Vs/ s H  n[        R                  " U5      PM     sn$ s  snf )az  
Return log probability estimates for the test vectors X.

Parameters
----------
X : {array-like, object with finite length or shape}
    Training data.

Returns
-------
P : ndarray of shape (n_samples, n_classes) or list of such arrays
    Returns the log probability of the sample for each class in
    the model, where classes are ordered arithmetically for each
    output.
r   )r]   rI   rC   Úlog)r%   rR   rg   Úps       r&   Úpredict_log_probaÚ!DummyClassifier.predict_log_proba“  sN   € ð  ×"Ñ" 1Ó%ˆØ�?‰?˜aÓÜ—6’6˜%“=Ð á',Ó-¢u !”B—F’F˜1–I¡uÑ-Ð-ùÒ-s   ¼ Ac                 ó   • SSSSS.S.$ )NTzfails for the predict method)Úcheck_methods_subset_invarianceÚ%check_methods_sample_order_invariance)Ú
poor_scoreÚno_validationÚ_xfail_checksr4   ©r%   s    r&   Ú
_more_tagsÚDummyClassifier._more_tags©  s   € àØ!à3QØ9Wññ
ð 	
r)   c                 óh   >• Uc  [         R                  " [        U5      S4S9n[        TU ]  XU5      $ )aÛ  Return the mean accuracy on the given test data and labels.

In multi-label classification, this is the subset accuracy
which is a harsh metric since you require for each sample that
each label set be correctly predicted.

Parameters
----------
X : None or array-like of shape (n_samples, n_features)
    Test samples. Passing None as test samples gives the same result
    as passing real test samples, since DummyClassifier
    operates independently of the sampled observations.

y : array-like of shape (n_samples,) or (n_samples, n_outputs)
    True labels for X.

sample_weight : array-like of shape (n_samples,), default=None
    Sample weights.

Returns
-------
score : float
    Mean accuracy of self.predict(X) w.r.t. y.
r   ©rH   ©rC   rq   ÚlenÚsuperÚscore©r%   rR   rS   rT   Ú	__class__s       €r&   r�   ÚDummyClassifier.score³  s1   ø€ ð2 ‰9Ü—’¤ A£¨˜{Ñ+ˆAÜ‰w‰}˜Q =Ó1Ð1r)   )	r;   rM   rK   r   rL   rI   r   rB   r!   r$   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   Ústrr"   ÚdictÚ__annotations__r'   r
   rV   rk   r]   r   rˆ   r�   Ú__static_attributes__Ú__classcell__©r‘   s   @r&   r   r   #   sˆ   ø‡ ñoñf ÒVÓWð
ð (Ð(Ø˜s L°$Ð7ñ$Ð˜Dó ð $+¸Èõ !ñ
 °Ñ5óXó 6ðXòtUòn=ò~.ò,
÷2õ 2r)   r   c            	       ó¾   ^ • \ rS rSr% Sr\" 1 Sk5      /\" \SSSS9S/\" \SSS	S9S
S/S.r\	\
S'   SSSS.S jr\" SS9SS j5       rSS jrS rSU 4S jjrSrU =r$ )ÚDummyRegressoriÑ  a×  Regressor that makes predictions using simple rules.

This regressor is useful as a simple baseline to compare with other
(real) regressors. Do not use it for real problems.

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

.. versionadded:: 0.13

Parameters
----------
strategy : {"mean", "median", "quantile", "constant"}, default="mean"
    Strategy to use to generate predictions.

    * "mean": always predicts the mean of the training set
    * "median": always predicts the median of the training set
    * "quantile": always predicts a specified quantile of the training set,
      provided with the quantile parameter.
    * "constant": always predicts a constant value that is provided by
      the user.

constant : int or float or array-like of shape (n_outputs,), default=None
    The explicit constant as predicted by the "constant" strategy. This
    parameter is useful only for the "constant" strategy.

quantile : float in [0.0, 1.0], default=None
    The quantile to predict using the "quantile" strategy. A quantile of
    0.5 corresponds to the median, while 0.0 to the minimum and 1.0 to the
    maximum.

Attributes
----------
constant_ : ndarray of shape (1, n_outputs)
    Mean or median or quantile of the training targets or constant value
    given by the user.

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

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.

n_outputs_ : int
    Number of outputs.

See Also
--------
DummyClassifier: Classifier that makes predictions using simple rules.

Examples
--------
>>> import numpy as np
>>> from sklearn.dummy import DummyRegressor
>>> X = np.array([1.0, 2.0, 3.0, 4.0])
>>> y = np.array([2.0, 3.0, 5.0, 10.0])
>>> dummy_regr = DummyRegressor(strategy="mean")
>>> dummy_regr.fit(X, y)
DummyRegressor()
>>> dummy_regr.predict(X)
array([5., 5., 5., 5.])
>>> dummy_regr.score(X, y)
0.0
>   ÚmeanÚmedianr   Úquantileg        rp   Úboth)ÚclosedNÚneitherr   )r!   r¢   r   r"   r    ©r!   r   r¢   c                ó(   • Xl         X l        X0l        g r$   r¦   )r%   r!   r   r¢   s       r&   r'   ÚDummyRegressor.__init__  s   € Ø ŒØ ŒØ �r)   Tr*   c           	      ó  • U R                  USS9  [        USSS9n[        U5      S:X  a  [        S5      eUR                  S:X  a  [
        R                  " US5      nUR                  S   U l        [        XU5        Ub  [        X15      nU R                  S
:X  a  [
        R                  " USUS9U l        GO—U R                  S:X  a\  Uc  [
        R                  " USS9U l        GOh[        U R                  5       Vs/ s H  n[!        US	S	2U4   USS9PM     snU l        GO+U R                  S:X  a�  U R"                  c  [        S5      eU R"                  S-  nUc  [
        R$                  " USUS9U l        OÕ[        U R                  5       Vs/ s H  n[!        US	S	2U4   X5S9PM     snU l        OšU R                  S:X  aŠ  U R&                  c  [)        S5      e[        U R&                  / SQSSS9U l        U R                  S:w  aE  U R                  R                  S   UR                  S   :w  a  [        SUR                  S   -  5      e[
        R                  " U R                  S5      U l        U $ s  snf s  snf )aP  Fit the random regressor.

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

y : array-like of shape (n_samples,) or (n_samples, n_outputs)
    Target values.

sample_weight : array-like of shape (n_samples,), default=None
    Sample weights.

Returns
-------
self : object
    Fitted estimator.
Fr-   rS   )Ú	ensure_2dÚ
input_namer   zy must not be empty.r   r/   Nr    )rZ   Úweightsr¡   rY   g      I@)Ú
percentiler¢   z^When using `strategy='quantile', you have to specify the desired quantile in the range [0, 1].g      Y@)rZ   Úqr   r1   )ÚcsrÚcscÚcoo)Úaccept_sparserª   Úensure_min_samplesr2   )r   r0   )r:   r   r�   rJ   rF   rC   rG   rH   rI   r   r   r!   ÚaverageÚ	constant_r¡   rN   r   r¢   r­   r   Ú	TypeError)r%   rR   rS   rT   r7   r­   s         r&   rV   ÚDummyRegressor.fit"  sF  € ð( 	×Ñ˜A¨uÐÑ5ä˜ U°sÑ;ˆÜˆq‹6�Q‹;ÜÐ3Ó4Ð4à�6‰6�Q‹;Ü—
’
˜1˜gÓ&ˆAØŸ'™' !™*ˆŒä  mÔ4àÑ$Ü0°ÓBˆMà�=‰=˜FÓ"ÜŸZšZ¨°¸=ÑIˆDŽNà�]‰]˜hÓ&ØÑ$Ü!#§¢¨1°1Ñ!5�–ô # 4§?¡?Ô3ó"â3˜ô )¨ª1¨a¨4©°-ÈDÔQÙ3ñ"�–ð
 �]‰]˜jÓ(Ø�}‰}Ñ$Ü ð4óð ð Ÿ™¨Ñ.ˆJØÑ$Ü!#§¢¨q°q¸JÑ!G�•ô # 4§?¡?Ô3ó"â3˜ô )¨ª1¨a¨4©°-ÔWÙ3ñ"�•ð
 �]‰]˜jÓ(Ø�}‰}Ñ$Üð:óð ô
 )Ø—‘Ú3ØØ#$ñ	ˆDŒNð �‰ !Ó#¨¯©×(<Ñ(<¸QÑ(?À1Ç7Á7È1Á:Ó(MÜ ØFÈÏÉÐQRÉÑSóð ô Ÿš D§N¡N°GÓ<ˆŒØˆùòQ"ùò"s   Ã>I7ÆI<c                 ó¦  • [        U 5        [        U5      n[        R                  " X0R                  4U R
                  [        R                  " U R
                  5      R                  S9n[        R                  " X0R                  45      nU R                  S:X  a,  [        R                  " U5      n[        R                  " U5      nU(       a  XE4$ U$ )a  Perform classification on test vectors X.

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

return_std : bool, default=False
    Whether to return the standard deviation of posterior prediction.
    All zeros in this case.

    .. versionadded:: 0.20

Returns
-------
y : array-like of shape (n_samples,) or (n_samples, n_outputs)
    Predicted target values for X.

y_std : array-like of shape (n_samples,) or (n_samples, n_outputs)
    Standard deviation of predictive distribution of query points.
rn   r   )
r   r   rC   ÚfullrI   rµ   r^   ro   rq   rd   )r%   rR   Ú
return_stdre   rS   Úy_stds         r&   rk   ÚDummyRegressor.predictv  s–   € ô, 	˜ÔÜ  “Oˆ	ä�GŠGØŸ™Ð(Ø�N‰NÜ—(’(˜4Ÿ>™>Ó*×0Ñ0ñ
ˆô
 —’˜)§_¡_Ð5Ó6ˆà�?‰?˜aÓÜ—’˜“ˆAÜ—H’H˜U“OˆEæ'�ˆzÐ.¨QÐ.r)   c                 ó   • SSS.$ )NT)r„   r…   r4   r‡   s    r&   rˆ   ÚDummyRegressor._more_tagsœ  s   € Ø"°TÑ:Ð:r)   c                 óh   >• Uc  [         R                  " [        U5      S4S9n[        TU ]  XU5      $ )aÞ  Return the coefficient of determination R^2 of the prediction.

The coefficient R^2 is defined as `(1 - u/v)`, where `u` is the
residual sum of squares `((y_true - y_pred) ** 2).sum()` and `v` is the
total sum of squares `((y_true - y_true.mean()) ** 2).sum()`. The best
possible score is 1.0 and it can be negative (because the model can be
arbitrarily worse). A constant model that always predicts the expected
value of y, disregarding the input features, would get a R^2 score of
0.0.

Parameters
----------
X : None or array-like of shape (n_samples, n_features)
    Test samples. Passing None as test samples gives the same result
    as passing real test samples, since `DummyRegressor`
    operates independently of the sampled observations.

y : array-like of shape (n_samples,) or (n_samples, n_outputs)
    True values for X.

sample_weight : array-like of shape (n_samples,), default=None
    Sample weights.

Returns
-------
score : float
    R^2 of `self.predict(X)` w.r.t. y.
r   r‹   rŒ   r�   s       €r&   r�   ÚDummyRegressor.scoreŸ  s1   ø€ ð: ‰9Ü—’¤ A£¨˜{Ñ+ˆAÜ‰w‰}˜Q =Ó1Ð1r)   )r   rµ   rI   r¢   r!   r$   )F)r“   r”   r•   r–   r—   r   r   r   r"   r™   rš   r'   r
   rV   rk   rˆ   r�   r›   rœ   r�   s   @r&   rŸ   rŸ   Ñ  s‘   ø‡ ñ?ñD  Ò JÓKÐLÙ˜d C¨°VÑ<¸dÐCá�T˜4 ¨iÑ8ØØð
ñ$Ð˜Dó ð $*°DÀ4õ !ñ
 °Ñ5óQó 6ðQôf$/òL;÷2õ 2r)   rŸ   )#r—   r?   Únumbersr   r   ÚnumpyrC   Úscipy.sparseÚsparser<   Úbaser   r   r   r	   r
   Úutilsr   Úutils._param_validationr   r   Úutils.multiclassr   Úutils.randomr   Úutils.statsr   Úutils.validationr   r   r   r   r   r   rŸ   r4   r)   r&   Ú<module>rÌ      sb   ðÙ <ó ß "ã Ý ÷õ õ &ß 9Ý 0Ý ,Ý -÷õ ôk2Ð&¨¸ô k2ô\m2Ð% ~°}õ m2r)   