How can I include prior information like a known relationship between my output variables of a regression problem into neural network design (fitnet)?
1 view (last 30 days)
Show older comments
F S on 1 Jun 2017
Commented: Greg Heath on 3 Jun 2017
How can I include prior information like a known relationship between my output variables into neural networks design?
In my case, I have many input variables that are physically independant from one another, and 4 output variables that have to sum up to 1 (respectively 100 %). The neural network per se tries to to satisfy this criterium, since all the training targets fulfill it, but it never quite gets 100 %, but rather somewhere between 98 and 102 %, which is physically not possible.
I was wondering if anybody knows a way to constrain the outputs by a function that needs to be fulfilled, or similar.
Thanks in advance, FS
Greg Heath on 1 Jun 2017
It depends on the relationship.
For [ 0, 1 ] targets that sum to 1, just use the crossentropy function in the output layer and choose the output with the maximum value.
This is standard approach for classifiers where the outputs are interpreted as posterior probabilities conditional on the input.
Hope this helps.
Thank you for formally accepting my answer
Greg Heath on 3 Jun 2017
If targets are 0 or 1 and the output sum is 1, crossentropy will yield what you want.
Although you are not designing a classifier, the conditions you have stated are, exactly, what defines a classier.
Hope this helps.
Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!