class_docstr: A VotingRegressor with weights being kwargs instead of a list, allowing
  for tuning.
  
  The kwargs need to be in format ``weight_n``, where n is an integer corresponding
  to the index of the estimator.
  
  If ``weights`` parameter is changed with ``set_params()``, ``weight_n`` parameters
  will change as well, and vice versa.
  
  scikit-learn description below:
  
  Prediction voting regressor for unfitted estimators.
  
  .. versionadded:: 0.21
  
  A voting regressor is an ensemble meta-estimator that fits several base
  regressors, each on the whole dataset. Then it averages the individual
  predictions to form a final prediction.
  
  Read more in the :ref:`User Guide <voting_regressor>`.
  
  Parameters
  ----------
  estimators : list of (str, estimator) tuples
      Invoking the ``fit`` method on the ``VotingRegressor`` will fit clones
      of those original estimators that will be stored in the class attribute
      ``self.estimators_``. An estimator can be set to ``'drop'`` using
      ``set_params``.
  
      .. versionchanged:: 0.21
          ``'drop'`` is accepted.
  
      .. deprecated:: 0.22
         Using ``None`` to drop an estimator is deprecated in 0.22 and
         support will be dropped in 0.24. Use the string ``'drop'`` instead.
  
  weights : array-like of shape (n_regressors,), default=None
      Sequence of weights (`float` or `int`) to weight the occurrences of
      predicted values before averaging. Uses uniform weights if `None`.
  
  n_jobs : int, default=None
      The number of jobs to run in parallel for ``fit``.
      ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
      ``-1`` means using all processors. See :term:`Glossary <n_jobs>`
      for more details.
  
  verbose : bool, default=False
      If True, the time elapsed while fitting will be printed as it
      is completed.
  
  Attributes
  ----------
  estimators_ : list of regressors
      The collection of fitted sub-estimators as defined in ``estimators``
      that are not 'drop'.
  
  named_estimators_ : Bunch
      Attribute to access any fitted sub-estimators by name.
  
      .. versionadded:: 0.20
  
  See Also
  --------
  VotingClassifier: Soft Voting/Majority Rule classifier.
  
  Examples
  --------
  >>> import numpy as np
  >>> from sklearn.linear_model import LinearRegression
  >>> from sklearn.ensemble import RandomForestRegressor
  >>> from sklearn.ensemble import VotingRegressor
  >>> r1 = LinearRegression()
  >>> r2 = RandomForestRegressor(n_estimators=10, random_state=1)
  >>> X = np.array([[1, 1], [2, 4], [3, 9], [4, 16], [5, 25], [6, 36]])
  >>> y = np.array([2, 6, 12, 20, 30, 42])
  >>> er = VotingRegressor([('lr', r1), ('rf', r2)])
  >>> print(er.fit(X, y).predict(X))
  [ 3.3  5.7 11.8 19.7 28.  40.3]
class_docstr_tok: ["A","VotingRegressor","with","weights","being","kwargs","instead","of","a","list",",","allowing","for","tuning",".","The","kwargs","need","to","be","in","format","``","weight_n","``",",","where","n","is","an","integer","corresponding","to","the","index","of","the","estimator",".","If","``","weights","``","parameter","is","changed","with","``","set_params","(",")","``",",","``","weight_n","``","parameters","will","change","as","well",",","and","vice","versa",".","scikit-learn","description","below",":","Prediction","voting","regressor","for","unfitted","estimators",".","..","versionadded",":",":","0.21","A","voting","regressor","is","an","ensemble","meta-estimator","that","fits","several","base","regressors",",","each","on","the","whole","dataset",".","Then","it","averages","the","individual","predictions","to","form","a","final","prediction",".","Read","more","in","the",":","ref",":","`","User","Guide","<","voting_regressor",">","`",".","Parameters","--","--","--","--","--","estimators",":","list","of","(","str",",","estimator",")","tuples","Invoking","the","``","fit","``","method","on","the","``","VotingRegressor","``","will","fit","clones","of","those","original","estimators","that","will","be","stored","in","the","class","attribute","``","self.estimators_","``",".","An","estimator","can","be","set","to","``","'drop","'","``","using","``","set_params","``",".","..","versionchanged",":",":","0.21","``","'drop","'","``","is","accepted",".","..","deprecated",":",":","0.22","Using","``","None","``","to","drop","an","estimator","is","deprecated","in","0.22","and","support","will","be","dropped","in","0.24",".","Use","the","string","``","'drop","'","``","instead",".","weights",":","array-like","of","shape","(","n_regressors",",",")",",","default=None","Sequence","of","weights","(","`","float","`","or","`","int","`",")","to","weight","the","occurrences","of","predicted","values","before","averaging",".","Uses","uniform","weights","if","`","None","`",".","n_jobs",":","int",",","default=None","The","number","of","jobs","to","run","in","parallel","for","``","fit","``",".","``","None","``","means","1","unless","in","a",":","obj",":","`","joblib.parallel_backend","`","context",".","``","-1","``","means","using","all","processors",".","See",":","term",":","`","Glossary","<","n_jobs",">","`","for","more","details",".","verbose",":","bool",",","default=False","If","True",",","the","time","elapsed","while","fitting","will","be","printed","as","it","is","completed",".","Attributes","--","--","--","--","--","estimators_",":","list","of","regressors","The","collection","of","fitted","sub-estimators","as","defined","in","``","estimators","``","that","are","not","'drop","'",".","named_estimators_",":","Bunch","Attribute","to","access","any","fitted","sub-estimators","by","name",".","..","versionadded",":",":","0.20","See","Also","--","--","--","--","VotingClassifier",":","Soft","Voting\/Majority","Rule","classifier",".","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","from","sklearn.linear_model","import","LinearRegression",">",">",">","from","sklearn.ensemble","import","RandomForestRegressor",">",">",">","from","sklearn.ensemble","import","VotingRegressor",">",">",">","r1","=","LinearRegression","(",")",">",">",">","r2","=","RandomForestRegressor","(","n_estimators=10",",","random_state=1",")",">",">",">","X","=","np.array","(","[","[","1",",","1","]",",","[","2",",","4","]",",","[","3",",","9","]",",","[","4",",","16","]",",","[","5",",","25","]",",","[","6",",","36","]","]",")",">",">",">","y","=","np.array","(","[","2",",","6",",","12",",","20",",","30",",","42","]",")",">",">",">","er","=","VotingRegressor","(","[","(","'lr","'",",","r1",")",",","(","'rf","'",",","r2",")","]",")",">",">",">","print","(","er.fit","(","X",",","y",")",".predict","(","X",")",")","[","3.3","5.7","11.8","19.7","28",".","40.3","]"]
code: def __init__(
      self,
      estimators,
      *,
      weights=None,
      n_jobs=None,
      verbose=False,
      **kwargs,
  ):
      self.weights = weights
      self._weight_kwargs_to_weights(kwargs, estimators=estimators)
      super().__init__(
          estimators=estimators,
          weights=self.weights,
          n_jobs=n_jobs,
          verbose=verbose,
      )
  
imports: import inspect
  from sklearn.base import clone
  from sklearn.ensemble import VotingClassifier, VotingRegressor
  from sklearn.neural_network import MLPClassifier, MLPRegressor
label_desc: Use image node_id 1 to create a new TunableVotingRegressor object from inherited base classes: VotingRegressor, TunableMixin with example: obj = TunableVotingRegressor(estimators)