naiveBayes_dynamicPrior {soundgen} | R Documentation |
Naive Bayes dynamic prior
Description
Internal soundgen function
Usage
naiveBayes_dynamicPrior(
d,
nObs = nrow(d),
mod_train,
wl,
class_names,
nClasses = length(class_names),
like_names,
prior_names,
predictors,
nPredictors = length(predictors)
)
Arguments
d |
dataframe containing the observations |
nObs |
the number of observations |
mod_train |
the output of naiveBayes_train() |
wl |
window length, points |
class_names |
names of outcome classes |
nClasses |
the number of outcome classes |
like_names |
the names of variables holding likelihoods |
prior_names |
the names of prior variables |
predictors |
the names of predictor variables |
nPredictors |
the number of predicto variables |
Details
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.
[Package soundgen version 2.7.2 Index]