Skip to content

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 over
  • col_val (str): name for column that stores the value to smooth over
  • col_axis (List[str]): list of column names that store the axes corresponding to the variables that define the neighborhood
  • radius (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 called col_val + "mean"