function [ outputmat, label_train ] = ClasificationTableMMR( vystup, nrofpatients, label_train,lines )
%% Funkce pro vypocet klasifikacnich stromu pro metodu mRMR
%
% vystup - cell vypocitanych parametru
% nrofpatients - pocet vsech pocitanych recniku
% label_train - vektor 0 a 1 (0 - zdravy recnik, 1 - pacient s PN)
% lines - pocet vybranych parametru

%% Priprava promennych
outputmat = cell(lines);  % Pripraveni cell pro vyplneni
%% Vyber trenovacich parametru a natrenovani
   for coll=2:nrofpatients+1;
       % Priprava trenovaciho label_train
       label_train_2 = label_train(coll:length(label_train));
       table_train_2 = cell2mat(vystup(2:lines,coll+1:nrofpatients+1));
       
        if coll==2
           label_train_3 = label_train_2;
           table_train_3 = table_train_2;
        else
           label_train_1 = label_train(1:coll-2);
           table_train_1 = cell2mat(vystup(2:lines,2:coll-1));
       
           label_train_3 = [label_train_1 label_train_2];
           table_train_3 = [table_train_1 table_train_2];
        end
       
       table_test = cell2mat(vystup(2:lines,coll)); % pripravena testovaci matice
        % Natrenovani
        obj = ClassificationTree.fit(table_train_3',label_train_3', 'Prior', 'uniform','SplitCriterion', 'gdi');
        outputmat(2,coll) = num2cell(predict(obj, table_test')); % ulozeni vysledku do pripraveneho cellu
    
   end
end








