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","."]
docstr: 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.
docstr_tok: ["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","."]
code: def predict(self, X):
      """
      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.
      """
      check_is_fitted(self, "constant_")
      X = check_array(X, accept_sparse=["csr", "csc", "coo"])
      n_samples = X.shape[0]
  
      y = np.ones((n_samples, 1)) * self.constant_
  
      if self.n_outputs_ == 1 and not self.output_2d_:
          y = np.ravel(y)
  
      return y
  
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 3 for calling the DummyRegressor obj's underlying member method code with example usage: obj.predict(X) and returns: y