`L iJdZddlZddlmZddlmZddlZddlm Z ddl m Z m Z m Z mZmZddlmZdd lmZdd lmZdd lmZmZdd lmZmZmZmZmZdd lm Z m!Z!m"Z"ddl#m$Z$ddl%m&Z&m'Z'ddl(m)Z)m*Z*ddl+m,Z,m-Z-m.Z.m/Z/m0Z0ddl1m2Z2m3Z3dZ4Gdde2e e Z5Gdde5Z6y)z1Recursive feature elimination for feature rankingN)deepcopy)Integral)effective_n_jobs) BaseEstimatorMetaEstimatorMixin _fit_contextclone is_classifier) get_scorer)check_cv_score)Bunchmetadata_routing)MetadataRouter MethodMapping_raise_for_params_routing_enabledprocess_routing) HasMethodsInterval RealNotInt)get_tags) _safe_split available_if)Paralleldelayed)_check_method_params_deprecate_positional_args_estimator_hascheck_is_fitted validate_data) SelectorMixin_get_feature_importancescj t||||\}} t|||||\ t||jj|} t||jj | |j ||  fdfi| |j|j|j|jfS)zM Return the score and n_features per step for a fit across one fold. )paramsindices)Xr(r)c2t|dd|fS)N) score_paramsr) estimatorfeaturesX_testr,scorery_tests d/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sklearn/feature_selection/_rfe.pyz!_rfe_single_fit..7s$F  1h;   % % ) rrr-fitr0score_fit step_scores_ step_support_ step_ranking_step_n_features_)rfer-r*ytraintestr0 routed_paramsX_trainy_train fit_paramsr/r,r1s ` @@@r2_rfe_single_fitrD's#9aE:GW Aq$>NFF% -))--uJ( M((..L CHH       S..0A0A3CWCW WWr4c eZdZUdZedggdeedddeedddgeedddeedddgd gee gd Z e e d <dddd d dZ edZedZeddZd"dZeeddZeeddZdZeeddZeeddZeeddZfd Zd!ZxZS)#RFEarFeature ranking with recursive feature elimination. Given an external estimator that assigns weights to features (e.g., the coefficients of a linear model), the goal of recursive feature elimination (RFE) is to select features by recursively considering smaller and smaller sets of features. First, the estimator is trained on the initial set of features and the importance of each feature is obtained either through any specific attribute or callable. Then, the least important features are pruned from current set of features. That procedure is recursively repeated on the pruned set until the desired number of features to select is eventually reached. Read more in the :ref:`User Guide `. Parameters ---------- estimator : ``Estimator`` instance A supervised learning estimator with a ``fit`` method that provides information about feature importance (e.g. `coef_`, `feature_importances_`). n_features_to_select : int or float, default=None The number of features to select. If `None`, half of the features are selected. If integer, the parameter is the absolute number of features to select. If float between 0 and 1, it is the fraction of features to select. .. versionchanged:: 0.24 Added float values for fractions. step : int or float, default=1 If greater than or equal to 1, then ``step`` corresponds to the (integer) number of features to remove at each iteration. If within (0.0, 1.0), then ``step`` corresponds to the percentage (rounded down) of features to remove at each iteration. verbose : int, default=0 Controls verbosity of output. importance_getter : str or callable, default='auto' If 'auto', uses the feature importance either through a `coef_` or `feature_importances_` attributes of estimator. Also accepts a string that specifies an attribute name/path for extracting feature importance (implemented with `attrgetter`). For example, give `regressor_.coef_` in case of :class:`~sklearn.compose.TransformedTargetRegressor` or `named_steps.clf.feature_importances_` in case of class:`~sklearn.pipeline.Pipeline` with its last step named `clf`. If `callable`, overrides the default feature importance getter. The callable is passed with the fitted estimator and it should return importance for each feature. .. versionadded:: 0.24 Attributes ---------- classes_ : ndarray of shape (n_classes,) The classes labels. Only available when `estimator` is a classifier. estimator_ : ``Estimator`` instance The fitted estimator used to select features. n_features_ : int The number of selected features. n_features_in_ : int Number of features seen during :term:`fit`. Only defined if the underlying estimator exposes such an attribute when 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 ranking_ : ndarray of shape (n_features,) The feature ranking, such that ``ranking_[i]`` corresponds to the ranking position of the i-th feature. Selected (i.e., estimated best) features are assigned rank 1. support_ : ndarray of shape (n_features,) The mask of selected features. See Also -------- RFECV : Recursive feature elimination with built-in cross-validated selection of the best number of features. SelectFromModel : Feature selection based on thresholds of importance weights. SequentialFeatureSelector : Sequential cross-validation based feature selection. Does not rely on importance weights. Notes ----- Allows NaN/Inf in the input if the underlying estimator does as well. References ---------- .. [1] Guyon, I., Weston, J., Barnhill, S., & Vapnik, V., "Gene selection for cancer classification using support vector machines", Mach. Learn., 46(1-3), 389--422, 2002. Examples -------- The following example shows how to retrieve the 5 most informative features in the Friedman #1 dataset. >>> from sklearn.datasets import make_friedman1 >>> from sklearn.feature_selection import RFE >>> from sklearn.svm import SVR >>> X, y = make_friedman1(n_samples=50, n_features=10, random_state=0) >>> estimator = SVR(kernel="linear") >>> selector = RFE(estimator, n_features_to_select=5, step=1) >>> selector = selector.fit(X, y) >>> selector.support_ array([ True, True, True, True, True, False, False, False, False, False]) >>> selector.ranking_ array([1, 1, 1, 1, 1, 6, 4, 3, 2, 5]) r5Nrr$rightclosedneitherverbose)r-n_features_to_selectsteprKimportance_getter_parameter_constraintsauto)rLrMrKrNcJ||_||_||_||_||_yNr-rLrMrNrK)selfr-rLrMrKrNs r2__init__z RFE.__init__s)#$8! !2 r4c.|jjSrR)r-_estimator_typerTs r2rWzRFE._estimator_types~~---r4c.|jjS)zClasses labels available when `estimator` is a classifier. Returns ------- ndarray of shape (n_classes,) ) estimator_classes_rXs r2r[z RFE.classes_s'''r4Fprefer_skip_nested_validationc trt|dfi|}ntt|}|j||fi|jj S)abFit the RFE model and then the underlying estimator on the selected features. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. y : array-like of shape (n_samples,) The target values. **fit_params : dict - If `enable_metadata_routing=False` (default): Parameters directly passed to the ``fit`` method of the underlying estimator. - If `enable_metadata_routing=True`: Parameters safely routed to the ``fit`` method of the underlying estimator. .. versionchanged:: 1.6 See :ref:`Metadata Routing User Guide ` for more details. Returns ------- self : object Fitted estimator. r5r5r-)rrrr7r-r5)rTr*r=rCr@s r2r5zRFE.fitsN>  +D%F:FM!Ej,ABMtyyA=!8!8!| } tA|tj$||z }d|| | d|<| tjB|xxdz cc<tj$||kDrtj&||} t)|j*|_"|jDj0|dd| f|fi||r|jj3t5| |jj3||jD| |j j3||j"j3| |j%|_#||_$| |_%|S)NcscrFT accept_sparseensure_min_featuresensure_all_finite multi_outputr$zFound n_features_to_select= > n_features=C. There will be no feature selection and all features will be kept.gg?)dtyperz#Fitting estimator with %d features.square)transform_func)&r#shaperL isinstancerwarningswarn UserWarningintrMmaxnponesboolr;r8r9r:sumaranger r-rKprintr5appendlenlistr&rNargsortravelmin logical_notrZ n_features_support_ranking_)rTr*r= step_scorerC n_featuresrLrMrrr.r- importancesranks thresholds r2r7zRFE._fitsw    !# 1WWQZ  $ $ ,#-? 118 <#'#<#< #j0 6!5 7:-HOO $'zD4M4M'M#N  S s1dii*456Dtyy>D77:T277:S1 $&D ! "D !#D !#D ffX!55yy,X6Hdnn-I||a;bffX>NNO IMM!AxK.! :z :%%,,S];!!((Ix)HI""))$x.9""))$x.93&&'K JJ{+EHHUOED"&&"25I"IJI49HXe_Zi0 1 R^^H- .! 3 .EffX!55J99Z(2/AakNA<<   ! ! ( (X 7    $ $Z%J K    % %h /    % %h /#<<>     r4predictc t||dt|trt|dfi|}nt t i}|j j |j|fi|jj S)aReduce X to the selected features and predict using the estimator. Parameters ---------- X : array of shape [n_samples, n_features] The input samples. **predict_params : dict Parameters to route to the ``predict`` method of the underlying estimator. .. versionadded:: 1.6 Only available if `enable_metadata_routing=True`, which can be set by using ``sklearn.set_config(enable_metadata_routing=True)``. See :ref:`Metadata Routing User Guide ` for more details. Returns ------- y : array of shape [n_samples] The predicted target values. r)rr`) rr"rrrrZr transformr-)rTr*predict_paramsr@s r2rz RFE.predictzsw2 .$ :  +D)N~NM!E",=>M&t&& NN1  !.!8!8!@!@  r4r6c t|trt|dfi|}ntt|}|jj |j ||fi|jj S)aReduce X to the selected features and return the score of the estimator. Parameters ---------- X : array of shape [n_samples, n_features] The input samples. y : array of shape [n_samples] The target values. **score_params : dict - If `enable_metadata_routing=False` (default): Parameters directly passed to the ``score`` method of the underlying estimator. - If `enable_metadata_routing=True`: Parameters safely routed to the `score` method of the underlying estimator. .. versionadded:: 1.0 .. versionchanged:: 1.6 See :ref:`Metadata Routing User Guide ` for more details. Returns ------- score : float Score of the underlying base estimator computed with the selected features returned by `rfe.transform(X)` and `y`. r6r6r`)r"rrrrZr6rr-)rTr*r=r,r@s r2r6z RFE.scoresm>   +D'J\JM!E ,EFM$t$$ NN1 q $1$;$;$A$A  r4c0t||jSrR)r"rrXs r2_get_support_maskzRFE._get_support_masks}}r4decision_functionclt||jj|j|S)aCompute the decision function of ``X``. Parameters ---------- X : {array-like or sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to ``dtype=np.float32`` and if a sparse matrix is provided to a sparse ``csr_matrix``. Returns ------- score : array, shape = [n_samples, n_classes] or [n_samples] The decision function of the input samples. The order of the classes corresponds to that in the attribute :term:`classes_`. Regression and binary classification produce an array of shape [n_samples]. )r"rZrrrTr*s r2rzRFE.decision_functions*& 001BCCr4 predict_probaclt||jj|j|S)a5Predict class probabilities for X. Parameters ---------- X : {array-like or sparse matrix} of shape (n_samples, n_features) The input samples. Internally, it will be converted to ``dtype=np.float32`` and if a sparse matrix is provided to a sparse ``csr_matrix``. Returns ------- p : array of shape (n_samples, n_classes) The class probabilities of the input samples. The order of the classes corresponds to that in the attribute :term:`classes_`. )r"rZrrrs r2rzRFE.predict_probas*" ,,T^^A->??r4predict_log_probaclt||jj|j|S)aPredict class log-probabilities for X. Parameters ---------- X : array of shape [n_samples, n_features] The input samples. Returns ------- p : array of shape (n_samples, n_classes) The class log-probabilities of the input samples. The order of the classes corresponds to that in the attribute :term:`classes_`. )r"rZrrrs r2rzRFE.predict_log_probas* 001BCCr4ct|}t|j}|j|_t |j |_t |j|_|j d|j _|jd|j_d|j_ |jj|j_ |jj|j_ |S)NT)super__sklearn_tags__rr-estimator_typerclassifier_tagsregressor_tags poor_score target_tagsrequired input_tagssparse allow_nan)rTtagssub_estimator_tags __class__s r2rzRFE.__sklearn_tags__sw')%dnn50??'(:(J(JK&'9'H'HI    +.2D +    *-1D   *$(!!3!>!>!E!E$6$A$A$K$K! r4ct|jjj|jt jddjddjdd}|S)jGet metadata routing of this object. Please check :ref:`User Guide ` on how the routing mechanism works. .. versionadded:: 1.6 Returns ------- routing : MetadataRouter A :class:`~sklearn.utils.metadata_routing.MetadataRouter` encapsulating routing information. ownerr5callercalleerr6r-method_mapping)rr__name__addr-rrTrouters r2get_metadata_routingzRFE.get_metadata_routingsf dnn&=&=>BBnn(? SeS , S )S 4 SS 0 C  r4rR)r __module__ __qualname____doc__rrrrstrcallablerOdict__annotations__rUpropertyrWr[r r5r7rr!rr6rrrrrr __classcell__)rs@r2rFrFDs|~!%)*  ZAg 6 Xq$y 9! Xq$y 9 ZAi 8 ;!8_ $D &"    ..((&+ >  >DbH.+,! -! F.)*& +& P.!456D7D*.12@3@&.!456D7D" r4rFc eZdZUdZiej eedddgdgdee gdegdZe e d<ejd d e jiZd d ddddd d dZededdddZdZdZdZy)RFECVa Recursive feature elimination with cross-validation to select features. The number of features selected is tuned automatically by fitting an :class:`RFE` selector on the different cross-validation splits (provided by the `cv` parameter). The performance of each :class:`RFE` selector is evaluated using `scoring` for different numbers of selected features and aggregated together. Finally, the scores are averaged across folds and the number of features selected is set to the number of features that maximize the cross-validation score. See glossary entry for :term:`cross-validation estimator`. Read more in the :ref:`User Guide `. Parameters ---------- estimator : ``Estimator`` instance A supervised learning estimator with a ``fit`` method that provides information about feature importance either through a ``coef_`` attribute or through a ``feature_importances_`` attribute. step : int or float, default=1 If greater than or equal to 1, then ``step`` corresponds to the (integer) number of features to remove at each iteration. If within (0.0, 1.0), then ``step`` corresponds to the percentage (rounded down) of features to remove at each iteration. Note that the last iteration may remove fewer than ``step`` features in order to reach ``min_features_to_select``. min_features_to_select : int, default=1 The minimum number of features to be selected. This number of features will always be scored, even if the difference between the original feature count and ``min_features_to_select`` isn't divisible by ``step``. .. versionadded:: 0.20 cv : int, cross-validation generator or an 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, if ``y`` is binary or multiclass, :class:`~sklearn.model_selection.StratifiedKFold` is used. If the estimator is not a classifier or if ``y`` is neither binary nor multiclass, :class:`~sklearn.model_selection.KFold` is used. Refer :ref:`User Guide ` for the various cross-validation strategies that can be used here. .. versionchanged:: 0.22 ``cv`` default value of None changed from 3-fold to 5-fold. scoring : str or callable, default=None Scoring method to evaluate the :class:`RFE` selectors' performance. Options: - str: see :ref:`scoring_string_names` for options. - callable: a scorer callable object (e.g., function) with signature ``scorer(estimator, X, y)``. See :ref:`scoring_callable` for details. - `None`: the `estimator`'s :ref:`default evaluation criterion ` is used. verbose : int, default=0 Controls verbosity of output. n_jobs : int or None, default=None Number of cores to run in parallel while fitting across folds. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` for more details. .. versionadded:: 0.18 importance_getter : str or callable, default='auto' If 'auto', uses the feature importance either through a `coef_` or `feature_importances_` attributes of estimator. Also accepts a string that specifies an attribute name/path for extracting feature importance. For example, give `regressor_.coef_` in case of :class:`~sklearn.compose.TransformedTargetRegressor` or `named_steps.clf.feature_importances_` in case of :class:`~sklearn.pipeline.Pipeline` with its last step named `clf`. If `callable`, overrides the default feature importance getter. The callable is passed with the fitted estimator and it should return importance for each feature. .. versionadded:: 0.24 Attributes ---------- classes_ : ndarray of shape (n_classes,) The classes labels. Only available when `estimator` is a classifier. estimator_ : ``Estimator`` instance The fitted estimator used to select features. cv_results_ : dict of ndarrays All arrays (values of the dictionary) are sorted in ascending order by the number of features used (i.e., the first element of the array represents the models that used the least number of features, while the last element represents the models that used all available features). .. versionadded:: 1.0 This dictionary contains the following keys: split(k)_test_score : ndarray of shape (n_subsets_of_features,) The cross-validation scores across (k)th fold. mean_test_score : ndarray of shape (n_subsets_of_features,) Mean of scores over the folds. std_test_score : ndarray of shape (n_subsets_of_features,) Standard deviation of scores over the folds. n_features : ndarray of shape (n_subsets_of_features,) Number of features used at each step. .. versionadded:: 1.5 split(k)_ranking : ndarray of shape (n_subsets_of_features,) The cross-validation rankings across (k)th fold. Selected (i.e., estimated best) features are assigned rank 1. Illustration in :ref:`sphx_glr_auto_examples_feature_selection_plot_rfe_with_cross_validation.py` .. versionadded:: 1.7 split(k)_support : ndarray of shape (n_subsets_of_features,) The cross-validation supports across (k)th fold. The support is the mask of selected features. .. versionadded:: 1.7 n_features_ : int The number of selected features with cross-validation. n_features_in_ : int Number of features seen during :term:`fit`. Only defined if the underlying estimator exposes such an attribute when 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 ranking_ : narray of shape (n_features,) The feature ranking, such that `ranking_[i]` corresponds to the ranking position of the i-th feature. Selected (i.e., estimated best) features are assigned rank 1. support_ : ndarray of shape (n_features,) The mask of selected features. See Also -------- RFE : Recursive feature elimination. Notes ----- The size of all values in ``cv_results_`` is equal to ``ceil((n_features - min_features_to_select) / step) + 1``, where step is the number of features removed at each iteration. Allows NaN/Inf in the input if the underlying estimator does as well. References ---------- .. [1] Guyon, I., Weston, J., Barnhill, S., & Vapnik, V., "Gene selection for cancer classification using support vector machines", Mach. Learn., 46(1-3), 389--422, 2002. Examples -------- The following example shows how to retrieve the a-priori not known 5 informative features in the Friedman #1 dataset. >>> from sklearn.datasets import make_friedman1 >>> from sklearn.feature_selection import RFECV >>> from sklearn.svm import SVR >>> X, y = make_friedman1(n_samples=50, n_features=10, random_state=0) >>> estimator = SVR(kernel="linear") >>> selector = RFECV(estimator, step=1, cv=5) >>> selector = selector.fit(X, y) >>> selector.support_ array([ True, True, True, True, True, False, False, False, False, False]) >>> selector.ranking_ array([1, 1, 1, 1, 1, 6, 4, 3, 2, 5]) For a detailed example of using RFECV to select features when training a :class:`~sklearn.linear_model.LogisticRegression`, see :ref:`sphx_glr_auto_examples_feature_selection_plot_rfe_with_cross_validation.py`. rNrJrH cv_object)min_features_to_selectcvscoringn_jobsrOrLgroupsr$rP)rMrrrrKrrNct||_||_||_||_||_||_||_||_yrR)r-rMrNrrrKrr) rTr-rMrrrrKrrNs r2rUzRFECV.__init__s># !2   &<#r4z1.8)versionFr\)rc t|dtdddd\tr#||jd|it dfi|n.t t i t d|i t i  t jtj }jjd}j|kDr+tjdjd|dtt!jt#j|j$j&j(t+j,dk(rt.t0c}n%t3j,}t5t0|fd|j6fij8j6D}t;|\} } } } t=j>| dddd} t=j>| } t=j>| } t=j>| } t=j@| dddd}| t=jB|}t!j|j&j$j(jDfijjDjF_#jH_$jJ_%tMj_'jNjDjQfijjD| dddddf}| dddddf}| dddddf}t=jR|dt=jT|ddtW| jdDcic] }d|d||c}tW| jdDcic] }d|d||c}tW| jdDcic] }d|d||c}d| i_,Scc}wcc}wcc}w)aaFit the RFE model and automatically tune the number of selected features. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) Training vector, where `n_samples` is the number of samples and `n_features` is the total number of features. y : array-like of shape (n_samples,) Target values (integers for classification, real numbers for regression). groups : array-like of shape (n_samples,) or None, default=None Group labels for the samples used while splitting the dataset into train/test set. Only used in conjunction with a "Group" :term:`cv` instance (e.g., :class:`~sklearn.model_selection.GroupKFold`). .. versionadded:: 0.20 **params : dict of str -> object Parameters passed to the ``fit`` method of the estimator, the scorer, and the CV splitter. .. versionadded:: 1.6 Only available if `enable_metadata_routing=True`, which can be set by using ``sklearn.set_config(enable_metadata_routing=True)``. See :ref:`Metadata Routing User Guide ` for more details. Returns ------- self : object Fitted estimator. r5csrrFTrcNrr_)splitr)r-splitterr0) classifierr$zFound min_features_to_select=rhri)r-rLrNrMrK)rc 3hK|])\}}tj ||+ywrR)r r-) .0r>r?r*funcr<r@r0rTr=s r2 zRFECV.fit..s8 t sT^^Q5$ V s/2r)axisrS)mean_test_scorestd_test_scorer _test_score_ranking_supportr)-rr#rupdaterrr rr r- _get_scorerrmrrorprqrFrrNrMrKrrr|rDrrrrziprtarrayrwargmaxr5rrrr rZ _transformmeanstdrange cv_results_)rTr*r=rr(rrparallel step_resultsscoressupportsrankingsstep_n_featuresstep_n_features_revscores_sum_revrL scores_rev supports_rev rankings_revirr<r@r0s``` @@@@r2r5z RFECV.fitsR &$.   !# 1  ! x01+D%B6BM!B-h%782Mdggq]4>>-J K!!#WWQZ  & & 3 MM3D4O4O3PQ#!m$--  nn!$T%@%@*!M"44LL  ( DKK (A -!?NHdt{{3H?+D  'rxx1M 0F0F0L0LM  7:<6H3(O hhq'9:4R4@&!88H%88H%Q/"52299^3LMnn!5"44LL   14 //334  ??  /DOOA.Q]5L5L5P5PQAttG_ 4R4( 4R4( !wwz: ffZa8 ?DFLLQRO>TUqc%z!}4U >C8>>RSCT=UVqc"LO3V  >C8>>RSCT=UVqc"LO3V  -   VVVsQQ2Qc t||d|j}trt|dfi|}nt }t i|_||||fi|j j S)a<Score using the `scoring` option on the given test data and labels. Parameters ---------- X : array-like of shape (n_samples, n_features) Test samples. y : array-like of shape (n_samples,) True labels for X. **score_params : dict Parameters to pass to the `score` method of the underlying scorer. .. versionadded:: 1.6 Only available if `enable_metadata_routing=True`, which can be set by using ``sklearn.set_config(enable_metadata_routing=True)``. See :ref:`Metadata Routing User Guide ` for more details. Returns ------- score : float Score of self.predict(X) w.r.t. y defined by `scoring`. r6r)rrrrrr0r6)rTr*r=r,rr@s r2r6z RFECV.scoresh4 ,g6""$  +D'J\JM!GM#(r?M tQ@]%9%9%?%?@@r4ct|jj}|j|jt jdd|jt |jt jdd|j|jt jddjdd|S) rrr5rrr)rrr6)r0r) rrrrr-rr rrrs r2rzRFECV.get_metadata_routings dnn&=&=> nn(?..eE.J    dgg&(?../    ##%(? SgS . SS 0   r4c|j$t|jrdnd}t|S|j}t|S)Naccuracyr2)rr r-r )rTrs r2rzRFECV._get_scorersA << $1$..$AjtG'""llG'""r4)rrrrrFrOrrrrrrpoprUNUSED_RFECV__metadata_request__fitrUr r r5r6rrr4r2rr.sL\$ $ $$#+Hai#P"Qm#x(" $D56')9)@)@A   =, .&+#'Q / Qf"AH!F#r4r)7rrocopyrnumbersrnumpyrtjoblibrbaserrr r r metricsr model_selectionr model_selection._validationrutilsrrutils._metadata_requestsrrrrrutils._param_validationrrr utils._tagsrutils.metaestimatorsrrutils.parallelrrutils.validationrr r!r"r#_baser%r&rDrFrrr4r2rs~8#XX &0+GF"<.;X:g-+]gTS#CS#r4