MATLAB m-flies for – SYSTEMS ANALYTICS: Adaptive Machine Learning WORKBOOK m-files in this folder are referenced in my book. Disclaimer: Code is provided is”. NO support for debugging or further explanation. “as Code is written in a fashion (= ) so that it is self-explanatory! “linear” “lame”! Write out the steps in the text of the book and use m-file contents as a to deepen “companion” your understanding of the text! If you create improved versions of my kindly share it with me () so that I can include them in the 2nd edition of the book. Many thanks! Enjoy! PG July 2016 follow . . . % NAIVE BAYES CLASSIFIER clear tic disp('--- start ---') distr='normal'; %distr='kernel'; % A=xlsread('Data'); B=A(:,[1,2,3,4]); Bm=mean(B); Bs=std(B); % B=[B(:,1)-Bm(1),B(:,2)-Bm(2),B(:,3)-Bm(3),B(:,4)-Bm(4)]; % B=[B(:,1)/Bs(1),B(:,2)/Bs(2),B(:,3)/Bs(3),B(:,4)/Bs(4)]; % Clabel=A(:,5); parallelcoords(B,'Group',Clabel)
MATLAB m-flies for – SYSTEMS ANALYTICS: Adaptive Machine Learning WORKBOOK m-files in this folder are referenced in my book. Disclaimer: Code is provided “as is”. NO support for debugging or further explanation. Code is written in a “linear” fashion (= “lame”! ) so that it is self-explanatory! Write out the steps in the text of the book and use m-file contents as a “companion” to deepen your understanding of the text! If you create improved versions of my kindly share it with me () so that I can include them in the 2nd edition of the book. Many thanks! Enjoy! PG July 2016 follow . . . % NAIVE BAYES CLASSIFIER clear tic disp('--- start ---') distr='normal'; %distr='kernel'; % A=xlsread('Data'); B=A(:,[1,2,3,4]); Bm=mean(B); Bs=std(B); % B=[B(:,1)-Bm(1),B(:,2)-Bm(2),B(:,3)-Bm(3),B(:,4)-Bm(4)]; % B=[B(:,1)/Bs(1),B(:,2)/Bs(2),B(:,3)/Bs(3),B(:,4)/Bs(4)]; % Clabel=A(:,5); parallelcoords(B,'Group',Clabel)