Z = csvread('RBF1vs5Reslts no alpha.csv'); 
[rows, columns] = size(Z);
disp("Rows Columns")
disp([rows, columns])
labels = Z(:,1);
fit=Z(:,2);
cmat=zeros(2,2);
for i=1:rows
       class=labels(i);
       bin =1;
       if(fit(i)>3) bin = 5; end;
       if(bin==1&&class==1) cmat(1,1)=cmat(1,1)+1;end
       if(bin==5&&class==1) cmat(2,1)=cmat(2,1)+1;end
       if(bin==5&&class==5) cmat(2,2)=cmat(2,2)+1;end
       if(bin==1&&class==5) cmat(1,2)=cmat(1,2)+1;end
end
disp("Confusion Matrix; class-specfic columns")
disp(cmat)
tot1s=cmat(1,1)+cmat(2,1);
tot5s=cmat(2,2)+cmat(1,2);
totall=tot1s+tot5s;
disp("Totals 1s, Total 5s, Total data")
disp([tot1s, tot5s, totall])
accur1s = cmat(1,1)/tot1s;
accur5s= cmat (2,2)/tot5s;
accurall=(cmat(1,1)+cmat(2,2))/totall;
disp("Accuracy 1s Accuracy 5s Overall Accuracy")
disp([accur1s, accur5s, accurall])