This function fits a kernel density estimator to a set of data points.
Another wrapper of ks::kde
.
fit_kde_object(df, h_band = NULL, position = 1:2, grid_size = rep(1000, 2))
df | data.frame with all the points |
---|---|
h_band | optional argument for the bandwidth of the kde object. If NULL,
the optimal band would be selected through the |
position | Columns position of x/y pair. Default is 1:2 |
grid_size | size of the grid which is going to be used for the evaluation of kde object. Can be reduced to speed-up computation. |
KDE object fitted to the df data.frame.
This function is shared with TCpredictionbands on github: TCpredictionbands.