diff --git a/chapter09/mixGaussPred.m b/chapter09/mixGaussPred.m index ebebaa0..f614081 100644 --- a/chapter09/mixGaussPred.m +++ b/chapter09/mixGaussPred.m @@ -1,4 +1,4 @@ -function [label, R] = mixGaussPred(X, model) +function [label, R] = mixGaussPred(model, X) % Predict label and responsibility for Gaussian mixture model. % Input: % X: d x n data matrix diff --git a/demo/ch09/mixGaussEm_demo.m b/demo/ch09/mixGaussEm_demo.m index 95a14bb..a6ab295 100644 --- a/demo/ch09/mixGaussEm_demo.m +++ b/demo/ch09/mixGaussEm_demo.m @@ -16,6 +16,6 @@ figure; plotClass(X1,z1); % predict -z2 = mixGaussPred(X2,model); +z2 = mixGaussPred(model,X2); figure; plotClass(X2,z2); \ No newline at end of file