% % 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 = load_sparrow(0,0,0,0); X = load_sparrow(1,0,1,0); % <- computation z-score %X = load_sparrow(1,0,0,1); % <- PCA based dimensionality reduction ... %X = load_sparrow(1,0,0,2); % <- SVD based dimensionality reduction ... [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 2, 3-5 clusters are optimal' ); axis( [ 1, 6, -729.1464 -610.4697 ] ); %saveas( gcf, '../../WriteUp/Graphics/Chapter6/prob_6_17_sparrow_bic_curves', 'epsc' ); return;