% % 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_skulls(0,0,0,0); X = load_skulls(1,0,1,0); % <- computation z-score %X = load_skulls(1,0,0,1); % <- PCA based dimensionality reduction ... %X = load_skulls(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 3, 4 clusters is optimal' ); %saveas( gcf, '../../WriteUp/Graphics/Chapter6/prob_6_17_skulls_bic_curves', 'epsc' ); return;