[plots for results_viewer] = svm_metrics (actual_label, predicted_label, predicted_perm, nPerm)

%% inputs to the function are as follows;
%% actual label 
%% predicted label (x kFolds)
%% permuted label  (x nPerms) *if nPerm=>1

nclasses= numel(unique(actual));                                            %%determine class problem
length = numel(actual)
[a itrs] = size(predicted)                                                  %%dimensions pred_label

%% code from Er.Abbas Manthiri S confusionmat (File Exchange) 
%%%% as many c_matrices as k folds #
%making new c-matrix is pointless
for i = 1:itrs
[c_matrix]= confusionmat(actual, predicted(:,i));
total_cmat = c_matrix + total_cmat;
end 





