class_docstr: CleanLearning = Machine Learning with cleaned data (even when training on messy, error-ridden data).
  
  Automated and robust learning with noisy labels using any dataset and any regression model.
  For regression tasks, this class trains a ``model`` with error-prone, noisy labels
  as if the model had been instead trained on a dataset with perfect labels.
  It achieves this by estimating which labels are noisy (you might solely use CleanLearning for this estimation)
  and then removing examples estimated to have noisy labels, such that a more robust copy of the same model can be
  trained on the remaining clean data.
  
  Parameters
  ----------
  model :
      Any regression model implementing the `sklearn estimator API <https://scikit-learn.org/stable/developers/develop.html#rolling-your-own-estimator>`_,
      defining the following functions:
  
      - ``model.fit(X, y)``
      - ``model.predict(X)``
      - ``model.score(X, y)``
  
      Default model used is `sklearn.linear_model.LinearRegression
      <https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html>`_.
  
  cv_n_folds :
      This class needs holdout predictions for every data example and if not provided,
      uses cross-validation to compute them. This argument sets the number of cross-validation
      folds used to compute out-of-sample predictions for each example in ``X``. Default is 5.
      Larger values may produce better results, but requires longer to run.
  
  n_boot :
      Number of bootstrap resampling rounds used to estimate the model's epistemic uncertainty.
      Default is 5. Larger values are expected to produce better results but require longer runtimes.
      Set as 0 to skip estimating the epistemic uncertainty and get results faster.
  
  include_aleatoric_uncertainty :
      Specifies if the aleatoric uncertainty should be estimated during label error detection.
      ``True`` by default, which is expected to produce better results but require longer runtimes.
  
  verbose :
      Controls how much output is printed. Set to ``False`` to suppress print statements. Default `False`.
  
  seed :
      Set the default state of the random number generator used to split
      the data. By default, uses ``np.random`` current random state.
class_docstr_tok: ["CleanLearning","=","Machine","Learning","with","cleaned","data","(","even","when","training","on","messy",",","error-ridden","data",")",".","Automated","and","robust","learning","with","noisy","labels","using","any","dataset","and","any","regression","model",".","For","regression","tasks",",","this","class","trains","a","``","model","``","with","error-prone",",","noisy","labels","as","if","the","model","had","been","instead","trained","on","a","dataset","with","perfect","labels",".","It","achieves","this","by","estimating","which","labels","are","noisy","(","you","might","solely","use","CleanLearning","for","this","estimation",")","and","then","removing","examples","estimated","to","have","noisy","labels",",","such","that","a","more","robust","copy","of","the","same","model","can","be","trained","on","the","remaining","clean","data",".","Parameters","--","--","--","--","--","model",":","Any","regression","model","implementing","the","`","sklearn","estimator","API","<","https",":","\/\/scikit-learn.org\/stable\/developers\/develop.html","#","rolling-your-own-estimator",">","`","_",",","defining","the","following","functions",":","-","``","model.fit","(","X",",","y",")","``","-","``","model.predict","(","X",")","``","-","``","model.score","(","X",",","y",")","``","Default","model","used","is","`","sklearn.linear_model.LinearRegression","<","https",":","\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.linear_model.LinearRegression.html",">","`","_",".","cv_n_folds",":","This","class","needs","holdout","predictions","for","every","data","example","and","if","not","provided",",","uses","cross-validation","to","compute","them",".","This","argument","sets","the","number","of","cross-validation","folds","used","to","compute","out-of-sample","predictions","for","each","example","in","``","X","``",".","Default","is","5",".","Larger","values","may","produce","better","results",",","but","requires","longer","to","run",".","n_boot",":","Number","of","bootstrap","resampling","rounds","used","to","estimate","the","model","'s","epistemic","uncertainty",".","Default","is","5",".","Larger","values","are","expected","to","produce","better","results","but","require","longer","runtimes",".","Set","as","0","to","skip","estimating","the","epistemic","uncertainty","and","get","results","faster",".","include_aleatoric_uncertainty",":","Specifies","if","the","aleatoric","uncertainty","should","be","estimated","during","label","error","detection",".","``","True","``","by","default",",","which","is","expected","to","produce","better","results","but","require","longer","runtimes",".","verbose",":","Controls","how","much","output","is","printed",".","Set","to","``","False","``","to","suppress","print","statements",".","Default","`","False","`",".","seed",":","Set","the","default","state","of","the","random","number","generator","used","to","split","the","data",".","By","default",",","uses","``","np.random","``","current","random","state","."]
docstr: Evaluates your wrapped regression model's score on a test set `X` with target values `y`.
  Uses your model's default scoring function, or r-squared score if your model as no ``"score"`` attribute.
  
  Parameters
  ----------
  X :
      Test data in the same format expected by your wrapped model.
  
  y :
      Test labels in the same format as labels previously used in ``fit()``.
  
  sample_weight :
      Optional array of shape ``(N,)`` or ``(N, 1)`` used to weight each test example when computing the score.
  
  Returns
  -------
  score : float
      Number quantifying the performance of this regression model on the test data.
docstr_tok: ["Evaluates","your","wrapped","regression","model","'s","score","on","a","test","set","`","X","`","with","target","values","`","y","`",".","Uses","your","model","'s","default","scoring","function",",","or","r-squared","score","if","your","model","as","no","``","``","score","''","``","attribute",".","Parameters","--","--","--","--","--","X",":","Test","data","in","the","same","format","expected","by","your","wrapped","model",".","y",":","Test","labels","in","the","same","format","as","labels","previously","used","in","``","fit","(",")","``",".","sample_weight",":","Optional","array","of","shape","``","(","N",",",")","``","or","``","(","N",",","1",")","``","used","to","weight","each","test","example","when","computing","the","score",".","Returns","--","--","--","-","score",":","float","Number","quantifying","the","performance","of","this","regression","model","on","the","test","data","."]
code: def score(
      self,
      X: Union[np.ndarray, pd.DataFrame],
      y: LabelLike,
      sample_weight: Optional[np.ndarray] = None,
  ) -> float:
      """Evaluates your wrapped regression model's score on a test set `X` with target values `y`.
      Uses your model's default scoring function, or r-squared score if your model as no ``"score"`` attribute.
  
      Parameters
      ----------
      X :
          Test data in the same format expected by your wrapped model.
  
      y :
          Test labels in the same format as labels previously used in ``fit()``.
  
      sample_weight :
          Optional array of shape ``(N,)`` or ``(N, 1)`` used to weight each test example when computing the score.
  
      Returns
      -------
      score : float
          Number quantifying the performance of this regression model on the test data.
      """
      if hasattr(self.model, "score"):
          if (
              "sample_weight"
              in inspect.signature(self.model.score).parameters
          ):
              return self.model.score(X, y, sample_weight=sample_weight)
          else:
              return self.model.score(X, y)
      else:
          return r2_score(
              y,
              self.model.predict(X),
              sample_weight=sample_weight,
          )
  
imports: from typing import Optional, Union, Tuple
  import inspect
  import warnings
  import math
  import numpy
  import pandas
  import sklearn.base
  from sklearn.base import BaseEstimator
  from sklearn.model_selection import KFold
  from sklearn.linear_model import LinearRegression
  from sklearn.metrics import r2_score
  from cleanlab.typing import LabelLike
  from cleanlab.internal.constants import TINY_VALUE
  from cleanlab.internal.util import train_val_split, subset_X_y
  from cleanlab.internal.regression_utils import assert_valid_regression_inputs
  from cleanlab.internal.validation import labels_to_array
label_desc: Use image node_id 4 for calling the CleanLearning obj's underlying member method code with example usage: obj.score(X, y, sample_weight) and returns: r2_score, self, self