NEURAL NETWORK-SIGMOID FUNCTION

8 Ansichten (letzte 30 Tage)
Abu Muaadh AlDrWiy
Abu Muaadh AlDrWiy am 26 Jul. 2017
Bearbeitet: Greg Heath am 28 Jul. 2017
I am working on using Artificial Neural Network for prediction.
My expected_Targets have values between 0 and 1.
The trained Neural_Target has sometimes -0.234 and 1.567 . 
Therefore, I want the trained Neural_Target to be in the range of 0 and 1. That is, any number less than 0.5 should be 0 and numbers above 0.5 should be 1.
I know I am to use "logsig" but I could not figure it well using MATLAB documentation.
Thanks in advance for your help
NEURAL NETWORK-SIGMOID FUNCTION. Available from: https://www.researchgate.net/post/NEURAL_NETWORK-SIGMOID_FUNCTION [accessed Jul 26, 2017].

Antworten (3)

Greg Heath
Greg Heath am 26 Jul. 2017
Bearbeitet: Greg Heath am 28 Jul. 2017
Apparently
1. You are using the term prediction when you
mean classification
2. You are using the term targets when
you mean outputs. Targets are desired outputs.
You did not state
3. The network design function. Patternnet
is the appropriate function for classification.
4. Any non-default patternnet input values. Use
the help and doc commands for the
description of patternnet and it's default
inputs.
5. The hidden and output layer transfer functions
are obtained from
>> hidlaytransfcn = net.layers{1}.transferFcn
hidlaytransfcn = 'tansig'
>> outlaytransfcn = net.layers{2}.transferFcn
outlaytransfcn = 'tansig'
which yields outputs in the open range (-1,1)
This is because patternnet (and other training functions) AUTOMATICALLY transform inputs and targets to the closed interval [-1, 1]. Then reverses the transformation upon output.
Therefore, if you use patternnet, all you have to do is input your 0/1 targets and let patternnet do its job!
Hope this helps.
Thank you for formally accepting my answer
Greg
  3 Kommentare
Greg Heath
Greg Heath am 27 Jul. 2017
I am sorry I did not make my self more clear.
PATTERNNET is a special case of FEEDFORWARDNET that is designed for classification of 0/1 targets.
See my QUICKIE code for starters
Then searching the NEWSGROUP and ANSWERS using
greg patternnet
should help more.
Hope this helps.
If it does,
Thank you for formally accepting my original answer
Greg
Abu Muaadh AlDrWiy
Abu Muaadh AlDrWiy am 28 Jul. 2017
@Greg Heath. Thanks for your time. I have checked through the link, I did not quite get it well.
I have explained my dataset and the procedure in the small msword (1page) attached. I will be grateful if you can help to make suggestions on what to do.
Thanks in advance
Regards Alabi

Melden Sie sich an, um zu kommentieren.


Abu Muaadh AlDrWiy
Abu Muaadh AlDrWiy am 27 Jul. 2017
@ Greg Heath.
Thanks for your answer.
Actually, I think I need to use "logsig" because I need the output between 0 and 1.
When I tried the suggestion you made, the following was obtained.
Yet, the outputs were not the expected 0 and 1. Thanks in Advance.

Greg Heath
Greg Heath am 28 Jul. 2017
Bearbeitet: Greg Heath am 28 Jul. 2017
I just posted a followup to QUICKIES
https://www.mathworks.com/matlabcentral/newsreader/view_thread/349202
The zeros and ones are the result of
vec2ind ( y ) ~= vec2ind( t )
Hope this helps.
Thank you for formally accepting my answer
Greg

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by