curvefit.utils.smoothing.local_smoother
Runs a local smoother over a neighborhood of covariate values
Runs a local smoother over a neighborhood
defined by col_axis, where the neighborhood is defined by radius.
Arguments
df (pd.DataFrame): data frame with values to smooth overcol_val (str): name for column that stores the value to smooth overcol_axis (List[str]): list of column names that store the axes corresponding to the variables that define the neighborhoodradius (List[int] | None, optional): list of the neighbor radius for each axis dimension
Returns
pd.DataFrame: return the data frame with an extra column for the smoothed value column calledcol_val + "mean"