Module ImportFrom alias Import alias Import alias identifier Import alias identifier ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareNotIn AttributeLoad NameLoad attr TupleLoad Str Str Str Str Str body Raise Call NameLoad Str If BoolOpAnd CompareEq AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr CompareEq AttributeLoad NameLoad attr Num If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad TupleLoad Num Num Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num If CompareEq AttributeLoad NameLoad attr Str body If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str orelse Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad Num Num If CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Num AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad If BoolOpAnd CompareEq AttributeLoad NameLoad attr Str Call NameLoad GeneratorExp CompareNotIn SubscriptLoad NameLoad Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad comprehension NameStore Call NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str If BoolOpAnd CompareEq AttributeLoad NameLoad attr Num UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad Str body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad keyword ListLoad Str Str Str Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore ListLoad NameLoad Assign NameStore ListLoad NameLoad Assign NameStore ListLoad NameLoad Assign NameStore ListLoad NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore ListLoad NameLoad If AttributeLoad NameLoad attr body Assign NameStore NameLoad If CompareIn AttributeLoad NameLoad attr TupleLoad Str Str body Assign NameStore ListComp Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr comprehension NameStore NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body Raise Call NameLoad Str orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore ListComp Call AttributeLoad NameLoad attr ListLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr orelse If CompareIn AttributeLoad NameLoad attr TupleLoad Str Str body Assign NameStore Call AttributeLoad NameLoad attr ListComp SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr comprehension NameStore Call NameLoad AttributeLoad NameLoad attr ListLoad NameLoad Num orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr GeneratorExp SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr keyword Num comprehension NameStore Call NameLoad AttributeLoad NameLoad attr attr orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore ListComp SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad keyword NameLoad comprehension NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad NameLoad Num If BoolOpAnd CompareEq AttributeLoad NameLoad attr Num UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad Str body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad keyword ListLoad Str Str Str Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If BoolOpAnd CompareEq AttributeLoad NameLoad attr Num UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore ListLoad NameLoad Assign NameStore ListLoad NameLoad Assign NameStore ListLoad NameLoad Assign NameStore ListLoad NameLoad Assign NameStore ListLoad For NameStore Call NameLoad AttributeLoad NameLoad attr body If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad SubscriptLoad NameLoad Index NameLoad keyword AttributeLoad NameLoad attr Assign SubscriptStore NameLoad ExtSlice Slice Index NameLoad Num orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore BinOpMult Call AttributeLoad NameLoad attr TupleLoad NameLoad Num SubscriptLoad NameLoad Index NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index NameLoad keyword NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad SubscriptLoad NameLoad Index NameLoad keyword AttributeLoad NameLoad attr AugAssignDiv NameStore SubscriptLoad NameLoad Index NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr CompareEq SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad SubscriptLoad NameLoad Index NameLoad keyword AttributeLoad NameLoad attr Assign SubscriptStore NameLoad ExtSlice Slice Index NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd CompareEq AttributeLoad NameLoad attr Num UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad NameLoad Index Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr Num body Return Call AttributeLoad NameLoad attr NameLoad orelse Return ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad decorator_list decorator_list ClassDef bases NameLoad NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareNotIn AttributeLoad NameLoad attr TupleLoad Str Str Str Str body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad keyword NameLoad If CompareEq Call NameLoad NameLoad Num body Raise Call NameLoad Str Assign AttributeStore NameLoad attr CompareEq AttributeLoad NameLoad attr Num If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad TupleLoad Num Num Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Expr Call NameLoad NameLoad NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Num keyword NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Num orelse Assign AttributeStore NameLoad attr ListComp Call NameLoad SubscriptLoad NameLoad ExtSlice Slice Index NameLoad NameLoad keyword Num comprehension NameStore Call NameLoad AttributeLoad NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr Str body If BoolOpOr CompareIs AttributeLoad NameLoad attr NameLoad UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign NameStore BinOpMult AttributeLoad NameLoad attr Num If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword Num keyword NameLoad orelse Assign AttributeStore NameLoad attr ListComp Call NameLoad SubscriptLoad NameLoad ExtSlice Slice Index NameLoad NameLoad keyword NameLoad comprehension NameStore Call NameLoad AttributeLoad NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr Str body If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr keyword ListLoad Str Str Str keyword NameLoad keyword Num If BoolOpAnd AttributeLoad NameLoad attr CompareNotEq SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num body Raise Call NameLoad BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad Num Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad Str body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad keyword ListLoad Str Str Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpMult Call AttributeLoad NameLoad attr TupleLoad NameLoad Num AttributeLoad NameLoad attr If BoolOpAnd CompareEq AttributeLoad NameLoad attr Num UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list
N/A __future__ division N/A warnings N/A numpy np N/A scipy.sparse sp base BaseEstimator ClassifierMixin RegressorMixin utils check_random_state utils.validation check_array utils.validation check_consistent_length utils.random random_choice_csc utils.stats _weighted_percentile utils.multiclass class_distribution DummyClassifier N/A BaseEstimator ClassifierMixin N/A N/A 
    DummyClassifier is a classifier that makes predictions using simple rules.

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

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

    Parameters
    ----------
    strategy : str, default="stratified"
        Strategy to use to generate predictions.

        * "stratified": generates predictions by respecting the training
          set's class distribution.
        * "most_frequent": always predicts the most frequent label in the
          training set.
        * "prior": always predicts the class that maximizes the class prior
          (like "most_frequent") and ``predict_proba`` returns the class prior.
        * "uniform": generates predictions uniformly at random.
        * "constant": always predicts a constant label that is provided by
          the user. This is useful for metrics that evaluate a non-majority
          class

          .. versionadded:: 0.17
             Dummy Classifier now supports prior fitting strategy using
             parameter *prior*.

    random_state : int seed, RandomState instance, or None (default)
        The seed of the pseudo random number generator to use.

    constant : int or str or array of shape = [n_outputs]
        The explicit constant as predicted by the "constant" strategy. This
        parameter is useful only for the "constant" strategy.

    Attributes
    ----------
    classes_ : array or list of array of shape = [n_classes]
        Class labels for each output.

    n_classes_ : array or list of array of shape = [n_classes]
        Number of label for each output.

    class_prior_ : array or list of array of shape = [n_classes]
        Probability of each class for each output.

    n_outputs_ : int,
        Number of outputs.

    outputs_2d_ : bool,
        True if the output at fit is 2d, else false.

    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.

     __init__ N/A N/A self strategy random_state constant N/A stratified None None N/A N/A N/A self strategy strategy N/A N/A self random_state random_state N/A N/A self constant constant N/A fit N/A N/A self X y sample_weight N/A None N/A N/A Fit the random classifier.

        Parameters
        ----------
        X : {array-like, sparse matrix}, shape = [n_samples, n_features]
            Training vectors, where n_samples is the number of samples
            and n_features is the number of features.

        y : array-like, shape = [n_samples] or [n_samples, n_outputs]
            Target values.

        sample_weight : array-like of shape = [n_samples], optional
            Sample weights.

        Returns
        -------
        self : object
            Returns self.
         N/A N/A N/A self strategy N/A most_frequent stratified uniform constant prior N/A N/A N/A ValueError Unknown strategy type. N/A N/A N/A N/A self strategy uniform N/A N/A sp issparse y N/A N/A y N/A N/A y toarray N/A N/A N/A warnings warn 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. UserWarning N/A N/A self sparse_output_ N/A N/A sp issparse y N/A N/A N/A self sparse_output_ N/A N/A y N/A N/A np atleast_1d y N/A N/A self output_2d_ N/A N/A y ndim 2 N/A N/A N/A y ndim 1 N/A N/A y N/A N/A np reshape y N/A -1 1 N/A N/A self n_outputs_ N/A N/A y shape N/A 1 N/A N/A N/A self strategy constant N/A N/A N/A N/A self constant None N/A N/A N/A ValueError Constant target value has to be specified when the constant strategy is used. N/A N/A constant N/A N/A np reshape N/A N/A np atleast_1d N/A self constant N/A -1 1 N/A N/A N/A N/A constant shape N/A 0 N/A self n_outputs_ N/A N/A N/A ValueError N/A Constant target value should have shape (%d, 1). N/A self n_outputs_ N/A N/A N/A self classes_ N/A self n_classes_ N/A self class_prior_ N/A class_distribution y sample_weight N/A N/A N/A N/A self strategy constant N/A any N/A N/A N/A constant N/A k N/A N/A self classes_ N/A k N/A k N/A range N/A self n_outputs_ N/A N/A N/A ValueError The constant target value must be present in training data N/A N/A N/A N/A self n_outputs_ 1 N/A N/A self output_2d_ N/A N/A N/A self n_classes_ N/A N/A self n_classes_ N/A 0 N/A N/A self classes_ N/A N/A self classes_ N/A 0 N/A N/A self class_prior_ N/A N/A self class_prior_ N/A 0 N/A self N/A predict N/A N/A self X N/A N/A N/A Perform classification on test vectors X.

        Parameters
        ----------
        X : {array-like, sparse matrix}, shape = [n_samples, n_features]
            Input vectors, where n_samples is the number of samples
            and n_features is the number of features.

        Returns
        -------
        y : array, shape = [n_samples] or [n_samples, n_outputs]
            Predicted target values for X.
         N/A N/A N/A hasattr self classes_ N/A N/A N/A ValueError DummyClassifier not fitted. N/A X N/A check_array X accept_sparse N/A csr csc coo N/A n_samples N/A int N/A N/A X shape N/A 0 N/A rs N/A check_random_state N/A self random_state N/A n_classes_ N/A self n_classes_ N/A classes_ N/A self classes_ N/A class_prior_ N/A self class_prior_ N/A constant N/A self constant N/A N/A N/A self n_outputs_ 1 N/A N/A n_classes_ N/A n_classes_ N/A classes_ N/A classes_ N/A class_prior_ N/A class_prior_ N/A constant N/A constant N/A N/A N/A self strategy stratified N/A N/A proba N/A N/A self predict_proba X N/A N/A N/A self n_outputs_ 1 N/A N/A proba N/A proba N/A N/A self sparse_output_ N/A N/A class_prob None N/A N/A N/A self strategy N/A most_frequent prior N/A N/A classes_ N/A N/A N/A np array N/A N/A N/A cp argmax N/A cp class_prior_ N/A N/A N/A N/A self strategy stratified N/A N/A class_prob class_prior_ N/A N/A N/A N/A self strategy uniform N/A N/A N/A ValueError Sparse target prediction is not supported with the uniform strategy N/A N/A N/A N/A self strategy constant N/A N/A classes_ N/A N/A N/A np array N/A c N/A c constant N/A y N/A random_choice_csc n_samples classes_ class_prob N/A self random_state N/A N/A N/A N/A self strategy N/A most_frequent prior N/A N/A y N/A N/A np tile N/A N/A N/A classes_ N/A k N/A N/A N/A N/A class_prior_ N/A k argmax N/A k N/A range N/A self n_outputs_ N/A n_samples 1 N/A N/A N/A N/A self strategy stratified N/A N/A y N/A N/A N/A np vstack N/A N/A N/A classes_ N/A k N/A N/A N/A N/A proba N/A k argmax axis 1 N/A k N/A range N/A self n_outputs_ T N/A N/A N/A N/A self strategy uniform N/A N/A ret N/A N/A N/A classes_ N/A k N/A N/A N/A rs randint N/A n_classes_ N/A k size n_samples N/A k N/A range N/A self n_outputs_ N/A y N/A N/A N/A np vstack ret T N/A N/A N/A N/A self strategy constant N/A N/A y N/A N/A np tile N/A self constant N/A n_samples 1 N/A N/A N/A N/A self n_outputs_ 1 N/A N/A self output_2d_ N/A N/A y N/A N/A np ravel y N/A y N/A predict_proba N/A N/A self X N/A N/A N/A 
        Return probability estimates for the test vectors X.

        Parameters
        ----------
        X : {array-like, sparse matrix}, shape = [n_samples, n_features]
            Input vectors, where n_samples is the number of samples
            and n_features is the number of features.

        Returns
        -------
        P : array-like or list of array-lke of shape = [n_samples, n_classes]
            Returns the probability of the sample for each class in
            the model, where classes are ordered arithmetically, for each
            output.
         N/A N/A N/A hasattr self classes_ N/A N/A N/A ValueError DummyClassifier not fitted. N/A X N/A check_array X accept_sparse N/A csr csc coo N/A n_samples N/A int N/A N/A X shape N/A 0 N/A rs N/A check_random_state N/A self random_state N/A n_classes_ N/A self n_classes_ N/A classes_ N/A self classes_ N/A class_prior_ N/A self class_prior_ N/A constant N/A self constant N/A N/A N/A N/A self n_outputs_ 1 N/A N/A self output_2d_ N/A N/A n_classes_ N/A n_classes_ N/A classes_ N/A classes_ N/A class_prior_ N/A class_prior_ N/A constant N/A constant N/A P N/A N/A k N/A range N/A self n_outputs_ N/A N/A N/A N/A self strategy most_frequent N/A N/A ind N/A N/A N/A class_prior_ N/A k argmax N/A out N/A N/A np zeros N/A n_samples N/A n_classes_ N/A k dtype N/A np float64 N/A N/A out N/A N/A N/A ind 1.0 N/A N/A N/A N/A self strategy prior N/A N/A out N/A N/A N/A np ones N/A n_samples 1 N/A class_prior_ N/A k N/A N/A N/A N/A self strategy stratified N/A N/A out N/A N/A rs multinomial 1 N/A class_prior_ N/A k size n_samples N/A N/A N/A N/A self strategy uniform N/A N/A out N/A N/A np ones N/A n_samples N/A n_classes_ N/A k dtype N/A np float64 N/A out N/A n_classes_ N/A k N/A N/A N/A N/A self strategy constant N/A N/A ind N/A N/A np where N/A N/A classes_ N/A k N/A constant N/A k N/A out N/A N/A np zeros N/A n_samples N/A n_classes_ N/A k dtype N/A np float64 N/A N/A out N/A N/A N/A ind 1.0 N/A N/A N/A P append out N/A N/A N/A N/A self n_outputs_ 1 N/A N/A self output_2d_ N/A N/A P N/A P N/A 0 N/A P N/A predict_log_proba N/A N/A self X N/A N/A N/A 
        Return log probability estimates for the test vectors X.

        Parameters
        ----------
        X : {array-like, sparse matrix}, shape = [n_samples, n_features]
            Input vectors, where n_samples is the number of samples
            and n_features is the number of features.

        Returns
        -------
        P : array-like or list of array-like of shape = [n_samples, n_classes]
            Returns the log probability of the sample for each class in
            the model, where classes are ordered arithmetically for each
            output.
         N/A proba N/A N/A self predict_proba X N/A N/A N/A self n_outputs_ 1 N/A N/A N/A N/A np log proba N/A N/A N/A N/A N/A np log p N/A p proba N/A N/A DummyRegressor N/A BaseEstimator RegressorMixin N/A N/A 
    DummyRegressor is 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>`.

    Parameters
    ----------
    strategy : str
        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 of shape = [n_outputs]
        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]
        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_ : float or array of shape [n_outputs]
        Mean or median or quantile of the training targets or constant value
        given by the user.

    n_outputs_ : int,
        Number of outputs.

    outputs_2d_ : bool,
        True if the output at fit is 2d, else false.
     __init__ N/A N/A self strategy constant quantile N/A mean None None N/A N/A N/A self strategy strategy N/A N/A self constant constant N/A N/A self quantile quantile N/A fit N/A N/A self X y sample_weight N/A None N/A N/A Fit the random regressor.

        Parameters
        ----------
        X : {array-like, sparse matrix}, shape = [n_samples, n_features]
            Training vectors, where n_samples is the number of samples
            and n_features is the number of features.

        y : array-like, shape = [n_samples] or [n_samples, n_outputs]
            Target values.

        sample_weight : array-like of shape = [n_samples], optional
            Sample weights.

        Returns
        -------
        self : object
            Returns self.
         N/A N/A N/A self strategy N/A mean median quantile constant N/A N/A N/A ValueError N/A Unknown strategy type: %s, expected 'mean', 'median', 'quantile' or 'constant' N/A self strategy N/A y N/A check_array y ensure_2d False N/A N/A N/A len y 0 N/A N/A N/A ValueError y must not be empty. N/A N/A self output_2d_ N/A N/A y ndim 2 N/A N/A N/A y ndim 1 N/A N/A y N/A N/A np reshape y N/A -1 1 N/A N/A self n_outputs_ N/A N/A y shape N/A 1 N/A N/A check_consistent_length X y sample_weight N/A N/A N/A self strategy mean N/A N/A N/A self constant_ N/A N/A np average y axis 0 weights sample_weight N/A N/A N/A N/A self strategy median N/A N/A N/A sample_weight None N/A N/A N/A self constant_ N/A N/A np median y axis 0 N/A N/A N/A self constant_ N/A N/A _weighted_percentile N/A y N/A N/A N/A k sample_weight percentile 50.0 N/A k N/A range N/A self n_outputs_ N/A N/A N/A N/A self strategy quantile N/A N/A N/A N/A N/A self quantile None N/A N/A N/A np isscalar N/A self quantile N/A N/A N/A ValueError N/A Quantile must be a scalar in the range [0.0, 1.0], but got %s. N/A self quantile N/A percentile N/A N/A self quantile 100.0 N/A N/A sample_weight None N/A N/A N/A self constant_ N/A N/A np percentile y axis 0 q percentile N/A N/A N/A self constant_ N/A N/A _weighted_percentile N/A y N/A N/A N/A k sample_weight percentile percentile N/A k N/A range N/A self n_outputs_ N/A N/A N/A N/A self strategy constant N/A N/A N/A N/A self constant None N/A N/A N/A TypeError Constant target value has to be specified when the constant strategy is used. N/A N/A self constant N/A check_array N/A self constant accept_sparse N/A csr csc coo ensure_2d False ensure_min_samples 0 N/A N/A N/A self output_2d_ N/A N/A N/A N/A self constant shape N/A 0 N/A N/A y shape N/A 1 N/A N/A N/A ValueError N/A Constant target value should have shape (%d, 1). N/A N/A y shape N/A 1 N/A N/A self constant_ N/A self constant N/A N/A self constant_ N/A N/A np reshape N/A self constant_ N/A 1 -1 N/A self N/A predict N/A N/A self X N/A N/A N/A 
        Perform classification on test vectors X.

        Parameters
        ----------
        X : {array-like, sparse matrix}, shape = [n_samples, n_features]
            Input vectors, where n_samples is the number of samples
            and n_features is the number of features.

        Returns
        -------
        y : array, shape = [n_samples]  or [n_samples, n_outputs]
            Predicted target values for X.
         N/A N/A N/A hasattr self constant_ N/A N/A N/A ValueError DummyRegressor not fitted. N/A X N/A check_array X accept_sparse N/A csr csc coo N/A n_samples N/A N/A X shape N/A 0 N/A y N/A N/A N/A np ones N/A n_samples 1 N/A self constant_ N/A N/A N/A N/A self n_outputs_ 1 N/A N/A self output_2d_ N/A N/A y N/A N/A np ravel y N/A y N/A N/A