class_docstr: 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.
class_docstr_tok: ["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","."]
code: def __init__(self, strategy="mean", constant=None, quantile=None):
      self.strategy = strategy
      self.constant = constant
      self.quantile = quantile
  
imports: from __future__ import division
  import warnings
  import numpy
  import scipy.sparse
  from .base import BaseEstimator, ClassifierMixin, RegressorMixin
  from .utils import check_random_state
  from .utils.validation import check_array
  from .utils.validation import check_consistent_length
  from .utils.validation import check_is_fitted
  from .utils.random import random_choice_csc
  from .utils.stats import _weighted_percentile
  from .utils.multiclass import class_distribution
label_desc: Use image node_id 1 to create a new DummyRegressor object from inherited base classes: BaseEstimator, RegressorMixin with example: obj = DummyRegressor(strategy, constant, quantile)