How do you classify a row of individual cells in MATLAB?
At the moment, I can classify individual colors as follows:
training = [1;0;-1;-2;4;0;1]; % this is the sample data.
target_class = ['posi';'zero';'negi';'negi';'posi';'zero';'posi'];
% target_class are the different target classes for the training data; here 'positive' and 'negetive' are the two classes for the given training data
% Training and Testing the classifier (between positive and negative)
test = 10*randn(25, 1); % this is for testing. I am generating random numbers.
class = classify(test,training, target_class, 'diaglinear') % This command classifies the test data depening on the given training data using a Naive Bayes classifier
Unlike the above, I want to classify:
A B C
Row A | 1 | 1 | 1 = a house
Row B | 1 | 2 | 1 = a garden
Here is a sample code from MATLAB:
nb = NaiveBayes.fit(training, class)
nb = NaiveBayes.fit(..., 'param1', val1, 'param2', val2, ...)
I do not understand what is param1, val1etc. Can anyone help?
source
share