Internal soundgen function
naiveBayes_dynamicPrior(
d,
nObs = nrow(d),
mod_train,
wl,
class_names,
nClasses = length(class_names),
like_names,
prior_names,
predictors,
nPredictors = length(predictors)
)
dataframe containing the observations
the number of observations
the output of naiveBayes_train()
window length, points
names of outcome classes
the number of outcome classes
the names of variables holding likelihoods
the names of prior variables
the names of predictor variables
the number of predicto variables
A Helper function called by naiveBayes
to calculate dynamic
priors. Algorithm: average the likelihoods of wl preceding observations
weighted by a Gaussian function, so more recent observations have more
weight.