 Ntrain  = 1000;
    Kvalues = [2, 10]; 
else
    Ntrain  = 1000;
    Kvalues = 2:15;
end
[Xtrain, ytrain, Xtest, ytest] = setupMnist('binary', binary, 'ntrain',...
    Ntrain,'ntest', Ntest,'keepSparse', keepSparse);
Xtrain = Xtrain + 1; % convert from 0:1 to 1:2
Xtest  = Xtest  + 1; 
%% Fit
[n, d] = size(Xtrain); 
NK     = length(Kvalues);
logp   = zeros(1, NK);
bicVal = zeros(1, NK);
options = {'maxIter', 10, 'verbose', true};
model = cell(1, NK); 
for i=1:NK
    K = Kvalues(i);
    fprintf('Fitting K = 