0
$\begingroup$

If you are tuning a Naive Bayes model using caret, can someone explain how increasing or decreasing the Laplace smoother and bandwidth impact the results? I understand that the Laplace smoother is to account for the zero-frequency issue, but I have been unable to find a suitable definition for bandwidth.

For example, if I have this grid

grid <- expand.grid(
  usekernel = c(TRUE, FALSE),
  fL = seq(0,5,0.5), # Bandwidth
  adjust = seq(0,5,0.5) # Laplace
)
$\endgroup$
1
$\begingroup$

In caret's doc, it seems like the definitions fL and adjust are interchanged (compared to your comments in the code). So, adjust is the bandwidth. It is an input for KDE, which is a non-parametric density estimation method. It is only used when usekernel option is TRUE. Otherwise, you don't need the parameter, since the density estimation method is Gaussian. The bandwidth in KDE represents the amount of spread in KDE kernel function.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.