% BRODATZ_DATA3 Make classification data for Anderson's task.
%

% Modifications:
% 25-aug-2004, VF

% load input training and testing data
trn_data = load_data('../data/brodatz_trn', ...
    {[1 2 3; 0.4 0.6 0.6],[4 5 6; 1 1 1 ] }); 
tst_data = load_data('../data/brodatz_tst',...
    {[1 2 3; 0.4 0.6 0.6],[4 5 6; 1 1 1 ] }); 

% use PCA and FLD for dimensionality reduction 
%-------------------------------------------------------
pca_model = pca(trn_data.X, 50);
trn_data.X = linproj(trn_data.X, pca_model);
tst_data.X = linproj(tst_data.X, pca_model);

fld_model = fld(trn_data);
trn_data.X = linproj(trn_data.X, fld_model);
tst_data.X = linproj(tst_data.X, fld_model);

savestruct(trn_data,'../data/brodatz3_trn');
savestruct(tst_data,'../data/brodatz3_tst');

% EOF
