Neural Networks - Can I constrain the range of the output of the network?

8 ビュー (過去 30 日間)
jlt199
jlt199 2016 年 10 月 3 日
回答済み: Cesare Trematore 2019 年 5 月 21 日
Hi all,
I am currently running a NN using fitnet. It's a function fitting - regression - type problem that I'm trying to train the network to solve.
From my research, I think the way to constrain the output range of the network is by selecting a suitable transform function in the final layer of the network. I've read the manual and couldn't find much about restricting the output. I want to restrict the range of the solution to [0,100] (due to the physical nature of the problem), any value within this range is acceptable. Can anyone help me with this please?
My current network looks like the attached image.
Many thanks

回答 (2 件)

Greg Heath
Greg Heath 2016 年 10 月 3 日
You probably only need 1 hidden node.
Scale the output from 0 to 1 and use a logsig output function.
Hope this helps
Greg
  4 件のコメント
jlt199
jlt199 2016 年 10 月 4 日
Thanks Greg,
My target values are scaled between 0 and 100, which is the range I'm after, but the output from the neural network (although mostly correct) has some wild outliers for example -350 or +400.
I think what you are suggesting is to scale my target vector between 0 and 1 and use that in combination with a logsig function in the final layer. Is this correct? I will try it first thing in the morning.
Thanks again
Greg Heath
Greg Heath 2016 年 10 月 5 日
Sorry, I made a mistake in my first reply.
I meant to say you only need one hidden layer.
Use as few hidden nodes as possible to get your desired output. My goal is usually
NMSE = mse(target-output)/mean(var(target',1))
<= 0.01
this will yield a
Rsquare =1-NMSE >= 0.99
Search Google for Rsquare.

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


Cesare Trematore
Cesare Trematore 2019 年 5 月 21 日
What should I do if I want a disjoint output? Say that in the range 0-1 my output should be either in range 0_.25 or in the range .75-1? cesare

カテゴリ

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