Наивная байесовская классификация рядов

Как вы классифицируете ряд отдельных ячеек в MATLAB?

На данный момент я могу классифицировать отдельные столбцы вот так:

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

В отличие от вышесказанного, я хочу классифицировать:

        A   B   C
Row A | 1 | 1 | 1 = a house

Row B | 1 | 2 | 1 = a garden

Вот пример кода с сайта MATLAB:

nb = NaiveBayes.fit(training, class)
nb = NaiveBayes.fit(..., 'param1', val1, 'param2', val2,...)

Я не понимаю, что такое param1, val1и т.д. Кто-нибудь может помочь?

5
задан Andrey Rubshtein 1 July 2012 в 10:32
поделиться