% % Example 6.7 % This shows how to use the function for the whole MBC procedure. % % Written by: % -- % John L. Weatherwax 2005-08-14 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- close all; drawnow; rehash; clc; clear; addpath( '../../Code/eda_data' ); addpath( '../../Code/eda_toolbox' ); addpath( '../Chapter1' ); [X,lab] = load_lungB(0,0,0,0); %X = load_lungB(1,1,0,0); % <- order by columns with the largest variance first ... then apply PCA %X = load_lungB(1,1,1,0); % <- order by columns with the largest variance first, compute the zscore, then apply PCA X = load_lungB(1,1,0,1); % <- order by columns with the largest variance first ... then apply PCA ... SEEMS THE BEST %X = load_lungB(1,0,1,1); % <- zscore ... then apply PCA %X = load_lungB(1,1,1,1); % <- order by columns with the largest variance, compute the zscore, ... then apply PCA %X = load_lungB(1,1,1,2); % <- order by columns with the largest variance, compute the zscore, ... then apply SVD [n,p] = size(X); data = X; % Call the model-based clustering procedure with a maximum of 6 clusters. [bics,bestmodel,allmodel,Z,clabs] = mbclust(data,6); % Display the BIC curves. figure; plotbic(bics); title( 'Model 5, 2 clusters are optimal' ); %saveas( gcf, '../../WriteUp/Graphics/Chapter6/prob_6_17_lungB_bic_curves', 'epsc' ); return;