0),10,1); y = y(:);
  [n d] = size(X);
  %X = rescaleData(X, 0, 1); % introduces many artefacts!
  h = 64; w = 64;
  name = 'faces'
end

%%%%%%%

if 0
  X = loadData('digits3Htf'); % 658 x 256 - row order, not column!
  %http://www-stat.stanford.edu/~tibs/ElemStatLearn/data.html
  h  = 16; w = 16;
  [n d] = size(X)
  X = reshape(X, [n h w]);
  X = permute(X, [3 2 1]); % 16 x 16 x 658
  X = reshape(X, [h*w n])';
end

if 0
  X = loadData('uspsAll'); % data: [256x1100x10 uint8]
  % http://www.cs.toronto.edu/~r