How could I cancel pre-processing and post-processing stages when training a neural network?

Illustration
Ntemourtsidou - 2021-07-26T09:37:29+00:00
Question: How could I cancel pre-processing and post-processing stages when training a neural network?

Whenever I use fitnet it applies minmax to my data by default, however my data is already scaled, so I was just wondering if there was a way to change this default feature.  

Expert Answer

Profile picture of Kshitij Singh Kshitij Singh answered . 2025-11-20

To remove mapminmax as a processFcn but still keep removeconstantrows
 
close all, clear all, clc
 
% WITH DEFAULT MAPMINMAX
 
 [x,t] = simplefit_dataset;
 net = fitnet;
 rng(0)
 [net tr y e ] = train(net,x,t);
 NMSE1 = mse(e)/mean(var(t',1))  % 1.7558e-05

% WITHOUT DEFAULT MAPMINMAX

 [x,t] = simplefit_dataset;
 net = fitnet;
 net.inputs{1}.processFcns={'removeconstantrows'};
 net.outputs{2}.processFcns={'removeconstantrows'};
 rng(0)
 [net tr y e ] = train(net,x,t);
 NMSE2 = mse(e)/mean(var(t',1))  % 1.7241e-05


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!