Home > freetb4matlab > nnet > subset.m

subset

PURPOSE ^

% @code{subset} splits the main data matrix which contains inputs and targets into 2 or 3 subsets

SYNOPSIS ^

function [mTrain, mTest, mVali] = subset(mData,nTargets,iOpti,fTest,fVali)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {}[@var{mTrain}, @var{mTest}, @var{mVali}] = subset (@var{mData},@var{nTargets},@var{iOpti},@var{fTest},@var{fVali})
% @code{subset} splits the main data matrix which contains inputs and targets into 2 or 3 subsets
% depending on the parameters. 
%
% The first parameter @var{mData} must be in row order. This means if the network
% contains three inputs, the matrix must be have 3 rows and x columns to define the
% data for the inputs. And some more rows for the outputs (targets), e.g. a neural network
% with three inputs and two outputs must have 5 rows with x columns~
% The second parameter @var{nTargets} defines the number or rows which contains the target values~
% The third argument @code{iOpti} is optional and can have three status:
%        0: no optimization
%     1: will randomise the column order and order the columns containing min and max values to be in the train set
%     2: will NOT randomise the column order, but order the columns containing min and max values to be in the train set
%       default value is @code{1}
% The fourth argument @code{fTest} is also optional and defines how 
% much data sets will be in the test set. Default value is @code{1/3}
% The fifth parameter @code{fTrain} is also optional and defines how
% much data sets will be in the train set. Default value is @code{1/6}
% So we have 50% of all data sets which are for training with the default values.
%
% @example
%   [mTrain, mTest] = subset(mData,1)
%   returns three subsets of the complete matrix
%   with randomized and optimized columns~
% @end example
% @example
%   [mTrain, mTest] = subset(mData,1,)
%   returns two subsets
% @end example
%
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003