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

3 ビュー (過去 30 日間)
NN
NN 2020 年 10 月 24 日
回答済み: Srivardhan Gadila 2020 年 10 月 31 日
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 Center および File ExchangeSequence 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