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