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

3 vues (au cours des 30 derniers jours)
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);

Réponses (1)

Srivardhan Gadila
Srivardhan Gadila le 31 Oct 2020
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

Catégories

En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by