class_docstr: Isotonic regression model.
  
  Read more in the :ref:`User Guide <isotonic>`.
  
  .. versionadded:: 0.13
  
  Parameters
  ----------
  y_min : float, default=None
      Lower bound on the lowest predicted value (the minimum value may
      still be higher). If not set, defaults to -inf.
  
  y_max : float, default=None
      Upper bound on the highest predicted value (the maximum may still be
      lower). If not set, defaults to +inf.
  
  increasing : bool or 'auto', default=True
      Determines whether the predictions should be constrained to increase
      or decrease with `X`. 'auto' will decide based on the Spearman
      correlation estimate's sign.
  
  out_of_bounds : {'nan', 'clip', 'raise'}, default='nan'
      Handles how `X` values outside of the training domain are handled
      during prediction.
  
      - 'nan', predictions will be NaN.
      - 'clip', predictions will be set to the value corresponding to
        the nearest train interval endpoint.
      - 'raise', a `ValueError` is raised.
  
  Attributes
  ----------
  X_min_ : float
      Minimum value of input array `X_` for left bound.
  
  X_max_ : float
      Maximum value of input array `X_` for right bound.
  
  X_thresholds_ : ndarray of shape (n_thresholds,)
      Unique ascending `X` values used to interpolate
      the y = f(X) monotonic function.
  
      .. versionadded:: 0.24
  
  y_thresholds_ : ndarray of shape (n_thresholds,)
      De-duplicated `y` values suitable to interpolate the y = f(X)
      monotonic function.
  
      .. versionadded:: 0.24
  
  f_ : function
      The stepwise interpolating function that covers the input domain ``X``.
  
  increasing_ : bool
      Inferred value for ``increasing``.
  
  See Also
  --------
  sklearn.linear_model.LinearRegression : Ordinary least squares Linear
      Regression.
  sklearn.ensemble.HistGradientBoostingRegressor : Gradient boosting that
      is a non-parametric model accepting monotonicity constraints.
  isotonic_regression : Function to solve the isotonic regression model.
  
  Notes
  -----
  Ties are broken using the secondary method from de Leeuw, 1977.
  
  References
  ----------
  Isotonic Median Regression: A Linear Programming Approach
  Nilotpal Chakravarti
  Mathematics of Operations Research
  Vol. 14, No. 2 (May, 1989), pp. 303-308
  
  Isotone Optimization in R : Pool-Adjacent-Violators
  Algorithm (PAVA) and Active Set Methods
  de Leeuw, Hornik, Mair
  Journal of Statistical Software 2009
  
  Correctness of Kruskal's algorithms for monotone regression with ties
  de Leeuw, Psychometrica, 1977
  
  Examples
  --------
  >>> from sklearn.datasets import make_regression
  >>> from sklearn.isotonic import IsotonicRegression
  >>> X, y = make_regression(n_samples=10, n_features=1, random_state=41)
  >>> iso_reg = IsotonicRegression().fit(X, y)
  >>> iso_reg.predict([.1, .2])
  array([1.8628..., 3.7256...])
class_docstr_tok: ["Isotonic","regression","model",".","Read","more","in","the",":","ref",":","`","User","Guide","<","isotonic",">","`",".","..","versionadded",":",":","0.13","Parameters","--","--","--","--","--","y_min",":","float",",","default=None","Lower","bound","on","the","lowest","predicted","value","(","the","minimum","value","may","still","be","higher",")",".","If","not","set",",","defaults","to","-inf",".","y_max",":","float",",","default=None","Upper","bound","on","the","highest","predicted","value","(","the","maximum","may","still","be","lower",")",".","If","not","set",",","defaults","to","+inf",".","increasing",":","bool","or","'auto","'",",","default=True","Determines","whether","the","predictions","should","be","constrained","to","increase","or","decrease","with","`","X","`",".","'auto","'","will","decide","based","on","the","Spearman","correlation","estimate","'s","sign",".","out_of_bounds",":","{","'nan","'",",","'clip","'",",","'raise","'","}",",","default='nan'","Handles","how","`","X","`","values","outside","of","the","training","domain","are","handled","during","prediction",".","-","'nan","'",",","predictions","will","be","NaN",".","-","'clip","'",",","predictions","will","be","set","to","the","value","corresponding","to","the","nearest","train","interval","endpoint",".","-","'raise","'",",","a","`","ValueError","`","is","raised",".","Attributes","--","--","--","--","--","X_min_",":","float","Minimum","value","of","input","array","`","X_","`","for","left","bound",".","X_max_",":","float","Maximum","value","of","input","array","`","X_","`","for","right","bound",".","X_thresholds_",":","ndarray","of","shape","(","n_thresholds",",",")","Unique","ascending","`","X","`","values","used","to","interpolate","the","y","=","f","(","X",")","monotonic","function",".","..","versionadded",":",":","0.24","y_thresholds_",":","ndarray","of","shape","(","n_thresholds",",",")","De-duplicated","`","y","`","values","suitable","to","interpolate","the","y","=","f","(","X",")","monotonic","function",".","..","versionadded",":",":","0.24","f_",":","function","The","stepwise","interpolating","function","that","covers","the","input","domain","``","X","``",".","increasing_",":","bool","Inferred","value","for","``","increasing","``",".","See","Also","--","--","--","--","sklearn.linear_model.LinearRegression",":","Ordinary","least","squares","Linear","Regression",".","sklearn.ensemble.HistGradientBoostingRegressor",":","Gradient","boosting","that","is","a","non-parametric","model","accepting","monotonicity","constraints",".","isotonic_regression",":","Function","to","solve","the","isotonic","regression","model",".","Notes","--","--","-","Ties","are","broken","using","the","secondary","method","from","de","Leeuw",",","1977",".","References","--","--","--","--","--","Isotonic","Median","Regression",":","A","Linear","Programming","Approach","Nilotpal","Chakravarti","Mathematics","of","Operations","Research","Vol",".","14",",","No",".","2","(","May",",","1989",")",",","pp",".","303-308","Isotone","Optimization","in","R",":","Pool-Adjacent-Violators","Algorithm","(","PAVA",")","and","Active","Set","Methods","de","Leeuw",",","Hornik",",","Mair","Journal","of","Statistical","Software","2009","Correctness","of","Kruskal","'s","algorithms","for","monotone","regression","with","ties","de","Leeuw",",","Psychometrica",",","1977","Examples","--","--","--","--",">",">",">","from","sklearn.datasets","import","make_regression",">",">",">","from","sklearn.isotonic","import","IsotonicRegression",">",">",">","X",",","y","=","make_regression","(","n_samples=10",",","n_features=1",",","random_state=41",")",">",">",">","iso_reg","=","IsotonicRegression","(",")",".fit","(","X",",","y",")",">",">",">","iso_reg.predict","(","[",".1",",",".2","]",")","array","(","[","1.8628","...",",","3.7256","...","]",")"]
docstr: Fit the model using X, y as training data.
  
  Parameters
  ----------
  X : array-like of shape (n_samples,) or (n_samples, 1)
      Training data.
  
      .. versionchanged:: 0.24
         Also accepts 2d array with 1 feature.
  
  y : array-like of shape (n_samples,)
      Training target.
  
  sample_weight : array-like of shape (n_samples,), default=None
      Weights. If set to None, all weights will be set to 1 (equal
      weights).
  
  Returns
  -------
  self : object
      Returns an instance of self.
  
  Notes
  -----
  X is stored for future use, as :meth:`transform` needs X to interpolate
  new input data.
docstr_tok: ["Fit","the","model","using","X",",","y","as","training","data",".","Parameters","--","--","--","--","--","X",":","array-like","of","shape","(","n_samples",",",")","or","(","n_samples",",","1",")","Training","data",".","..","versionchanged",":",":","0.24","Also","accepts","2d","array","with","1","feature",".","y",":","array-like","of","shape","(","n_samples",",",")","Training","target",".","sample_weight",":","array-like","of","shape","(","n_samples",",",")",",","default=None","Weights",".","If","set","to","None",",","all","weights","will","be","set","to","1","(","equal","weights",")",".","Returns","--","--","--","-","self",":","object","Returns","an","instance","of","self",".","Notes","--","--","-","X","is","stored","for","future","use",",","as",":","meth",":","`","transform","`","needs","X","to","interpolate","new","input","data","."]
code: def fit(self, X, y, sample_weight=None):
      """Fit the model using X, y as training data.
  
      Parameters
      ----------
      X : array-like of shape (n_samples,) or (n_samples, 1)
          Training data.
  
          .. versionchanged:: 0.24
             Also accepts 2d array with 1 feature.
  
      y : array-like of shape (n_samples,)
          Training target.
  
      sample_weight : array-like of shape (n_samples,), default=None
          Weights. If set to None, all weights will be set to 1 (equal
          weights).
  
      Returns
      -------
      self : object
          Returns an instance of self.
  
      Notes
      -----
      X is stored for future use, as :meth:`transform` needs X to interpolate
      new input data.
      """
      check_params = dict(accept_sparse=False, ensure_2d=False)
      X = check_array(
          X,
          input_name="X",
          dtype=[np.float64, np.float32],
          **check_params,
      )
      y = check_array(y, input_name="y", dtype=X.dtype, **check_params)
      check_consistent_length(X, y, sample_weight)
  
      # Transform y by running the isotonic regression algorithm and
      # transform X accordingly.
      X, y = self._build_y(X, y, sample_weight)
  
      # It is necessary to store the non-redundant part of the training set
      # on the model to make it possible to support model persistence via
      # the pickle module as the object built by scipy.interp1d is not
      # picklable directly.
      self.X_thresholds_, self.y_thresholds_ = X, y
  
      # Build the interpolation function
      self._build_f(X, y)
      return self
  
imports: import math
  import warnings
  from numbers import Real
  import numpy
  from scipy import interpolate
  from scipy.stats import spearmanr
  from ._isotonic import _inplace_contiguous_isotonic_regression, _make_unique
  from .base import BaseEstimator, RegressorMixin, TransformerMixin, _fit_context
  from .utils import check_array, check_consistent_length
  from .utils._param_validation import Interval, StrOptions, validate_params
  from .utils.validation import _check_sample_weight, check_is_fitted
label_desc: Use image node_id 5 for calling the IsotonicRegression obj's underlying member method code with example usage: obj.fit(X, y, sample_weight) and returns: self