How can i unnormalize the forecasted system load outputs in Neural Networks in Matlab

3 次查看(过去 30 天)
I normalised and unnormalised training and test data as mentioned below and hwo can i unnormalise the forecased output to the scale of test data ?
% normalising training and test data
[pn,ps] = mapminmax(input_train);
[tn,ts] = mapminmax(target_train);
[pn1,ps1] = mapminmax(input_test);
[tn1,ts1] = mapminmax(target_test);
forecastedoutput=net(pn1);
an = sim(net,pn);
a = mapminmax('reverse',an,ts);

回答(1 个)

Srivardhan Gadila
Srivardhan Gadila 2020-10-31
It is recommended to normalize the entire dataset first and then split it for training and testing so that the normalization would be consistent.
Or use the same normalization settings which are used for training data to normalize the testing data:
% normalising training data
[pn,ps] = mapminmax(input_train);
[tn,ts] = mapminmax(target_train);
% normalize test data with settings used for normalizing the training data
pn1 = mapminmax('apply',input_test,ps);
tn1 = mapminmax('apply',target_test,ts);
an = sim(net,pn1);
a = mapminmax('reverse',an,ts);
Refer to the documentation of Normalize Inputs and Targets Using mapminmax & sim

类别

Help CenterFile Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by