train (cv.NormalBayesClassifier) - MATLAB File Help
cv.NormalBayesClassifier/train

Trains the statistical model

status = model.train(samples, responses)
status = model.train(csvFilename, [])
[...] = model.train(..., 'OptionName', optionValue, ...)

Input

Output

Options

Options for Data (first variant with samples and reponses)

Options for Data (second variant for loading CSV file)

The method trains the Normal Bayes classifier. It follows the conventions of the generic train approach with the following limitations:

The method trains the statistical model using a set of input feature vectors and the corresponding output values (responses). Both input and output vectors/values are passed as matrices. The input feature vectors are stored as trainData rows, that is, all the components (features) of a training vector are stored continuously.

Responses are usually stored in a 1D vector (a row or a column) of integers.

See also
Method Details
Access public
Sealed false
Static false