Clear Filters
Clear Filters

Input Process Settings fitnet not working properly

5 views (last 30 days)
For the following code below
x1=0:0.01:2; %need to fix this error
x2=0:0.01:2; %
target=5*input(1,:)+input(2,:).^3 ;
net.outputs{2}.processFcns = {'mapminmax'};
[net, tr]=train(net,input,target);
I am getting null net.inputs.processSettings when the variables x1 and x2 are set to these below values
For all other cases the values seems to coming out fine example

Accepted Answer

Mohith Kulkarni
Mohith Kulkarni on 13 Oct 2020
Hi Aditya,
Unfortunately, this seems likely to be a bug. I have brought this issue to the notice of our developers. They will investigate the matter further.
It's normal for some of the processing functions to be removed from the final 'net' structure but only when they're unused. In this case, I don't think they've been removed correctly.
Since this does not happen for most datasets, if this is not the final dataset the you want to use, I suggest you carry on with your analysis with a different dataset if that's the case.
If this really is the dataset you would like to use, then you could try to remove the mapminmax function from the input and output preprocessing functions. It doesn't seem to make a big difference in results for this specific data:
net.inputs{1}.processFcns = {};
net.outputs{2}.processFcns ={};
One other option could be to remove the 'mapminmax' function from the input processing functions and do the processing offline. Bearing in mind that the data is internally split into train/test/val datasets. The offline processing should respect this split, by fixing the partition:
net.divideFcn = 'divideind';
net.divideParam.trainInd = train_ind;
net.divideParam.valInd = val_ind;
net.divideParam.testInd = test_ind;
Where train_ind, test_ind and val_ind are the indices of the train, test and validation datasets determined by you.
You can use the function 'mapminmax' to do the processing on the training data and apply to the test/val datasets, as follows:
[Xtrain,settings] = mapminmax(Xtrain);
Xtest = mapminmax.apply(Xtest,settings);

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!