%  main.m

%

%    This is the main script used for demonstration of the functions.

%



% Loading the data

sono = load('nevsono.mat');

% In order to load wavelets data uncomment the next line

%wv = load('data\seiswv.mat')

train_data = sono.dsono;

train_label = sono.t_d;

% In order to use wavelets data uncomment the next lines

%train_data = wv.coefs;

%train_label = wv.t_d;



% Defining the options structure used for configuration of the 

% preprocessing and of the network

procoptions = struct('method', '', 'inputdim', '');

netoptions  = struct('method', '');

options = struct('preproc_options', procoptions, 'net_options', netoptions, 'conf_options', '');



% Setting the specific options

options.net_options.method       = 'bcm';

options.preproc_options.method   = 'minimal entropy';

options.conf_options = 'variance';



% Finding the architecture of the network

[preproc, netarch] = findarch(train_data, train_label, options);



% Choosing a sample to test on

data = train_data(1,:);



% Checking the selected sample on the network

[label_pred, confidence] = netpred(data, preproc, netarch, options);

