class_docstr: Modifies the target before training.
  
  The user is expected to check that `func` and `inverse_func` are coherent with each other.
  
  Parameters
  ----------
  regressor
      Regression model to wrap.
  func
      A function modifying the target before training.
  inverse_func
      A function to return to the target's original space.
  
  Examples
  --------
  
  >>> import math
  >>> from river import compose
  >>> from river import datasets
  >>> from river import evaluate
  >>> from river import linear_model
  >>> from river import metrics
  >>> from river import preprocessing
  
  >>> dataset = datasets.TrumpApproval()
  >>> model = (
  ...     preprocessing.StandardScaler() |
  ...     compose.TargetTransformRegressor(
  ...         regressor=linear_model.LinearRegression(intercept_lr=0.15),
  ...         func=math.log,
  ...         inverse_func=math.exp
  ...     )
  ... )
  >>> metric = metrics.MSE()
  
  >>> evaluate.progressive_val_score(dataset, model, metric)
  MSE: 10.999752
class_docstr_tok: ["Modifies","the","target","before","training",".","The","user","is","expected","to","check","that","`","func","`","and","`","inverse_func","`","are","coherent","with","each","other",".","Parameters","--","--","--","--","--","regressor","Regression","model","to","wrap",".","func","A","function","modifying","the","target","before","training",".","inverse_func","A","function","to","return","to","the","target","'s","original","space",".","Examples","--","--","--","--",">",">",">","import","math",">",">",">","from","river","import","compose",">",">",">","from","river","import","datasets",">",">",">","from","river","import","evaluate",">",">",">","from","river","import","linear_model",">",">",">","from","river","import","metrics",">",">",">","from","river","import","preprocessing",">",">",">","dataset","=","datasets.TrumpApproval","(",")",">",">",">","model","=","(","...","preprocessing.StandardScaler","(",")","|","...","compose.TargetTransformRegressor","(","...","regressor=linear_model.LinearRegression","(","intercept_lr=0.15",")",",","...","func=math.log",",","...","inverse_func=math.exp","...",")","...",")",">",">",">","metric","=","metrics.MSE","(",")",">",">",">","evaluate.progressive_val_score","(","dataset",",","model",",","metric",")","MSE",":","10.999752"]
code: def _wrapped_model(self):
      return self.regressor
  
file_path: river/river/compose/target_transform.py
imports: from __future__ import annotations
  import typing
  from river import base
label_desc: Use image node_id 2 for calling the TargetTransformRegressor obj's underlying member method code with example usage: obj._wrapped_model() and returns: self