Navigation

Operators and Keywords

Function List:

C++ API

Function File: [mTrain, mTest, mVali] = subset (mData,nTargets,iOpti,fTest,fVali)

subset splits the main data matrix which contains inputs and targets into 2 or 3 subsets depending on the parameters.

The first parameter 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 nTargets defines the number or rows which contains the target values! The third argument 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 1 The fourth argument fTest is also optional and defines how much data sets will be in the test set. Default value is 1/3 The fifth parameter fTrain is also optional and defines how much data sets will be in the train set. Default value is 1/6 So we have 50% of all data sets which are for training with the default values.

            [mTrain, mTest] = subset(mData,1)
            returns three subsets of the complete matrix
            with randomized and optimized columns!
            [mTrain, mTest] = subset(mData,1,)
            returns two subsets