Do I need to normalise input and target data when training an ANN using fitnet?

5 ビュー (過去 30 日間)
Muhammad Usman Saeed
Muhammad Usman Saeed 2025 年 6 月 5 日
I am training an artificial neural network using MATLAB's `fitnet` function with 5 input variables (e.g., compression ratio, HES, SOI, injection duration, RPM) and 10 outputs (e.g., BTE, NOx, BSFC, Torque, CO, etc.).
I understand that `fitnet` automatically normalises input data using `mapminmax`. However, I am not sure whether I also need to manually normalise the **target (output)** data before training.
Do I need to normalise the **outputs** manually, especially when they vary widely in scale (e.g., NOx in ppm, BTE in %, BSFC in kg/kWh)?
Also, what is the correct way to **denormalise predictions** after training?
Any clarification would be appreciated.

回答 (1 件)

Manish
Manish 2025 年 6 月 7 日
Hi,
The 'mapminmax' function scales inputs and targets to fall within the range [–1, 1].
The following code demonstrates how to use it:
[pn,ps] = mapminmax(p);
[tn,ts] = mapminmax(t);
net = train(net,pn,tn);
No manual effort is required for normalization.
If needed, you can reverse the normalization using the 'reverse' option with 'mapminmax'.
Refer to the documentation link for better understanding:
  • https://www.mathworks.com/help/deeplearning/ref/mapminmax.html
  1 件のコメント
Muhammad Usman Saeed
Muhammad Usman Saeed 2025 年 6 月 9 日
Thank you so much for your response!
Could you please let me know should I denormalise the predections or it is also denormalised automatially?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeTransaction Cost Analysis についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by