multinomialNB#
- swordfish.function.multinomialNB()#
Conduct the multinomial Naive Bayesian classification.
- Parameters:
Y (Constant) – A vector with the same length as table X. Each element of labels indicates the class that the correponding row in X belongs to.
X (Constant) – A table indicating the training set. Each row is a sample and each column is a feature.
varSmoothing (Constant) – A positive floating number between 0 and 1 indicating the additive (Laplace/ Lidstone) smoothing parameter (0 for no smoothing).
- Returns:
A dictionary with the following keys:
model: a RESOURCE data type variable. It is an internal binary resource generated by function multinomialNB and to be used by function predict.
modelName: string “multinomialNB”.
varSmoothing: varSmoothing parameter value.
- Return type: