NEURAL NETWORK-SIGMOID FUNCTION

조회 수: 12 (최근 30일)
Abu Muaadh AlDrWiy
Abu Muaadh AlDrWiy 2017년 7월 26일
편집: Greg Heath 2017년 7월 28일
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].

답변 (3개)

Greg Heath
Greg Heath 2017년 7월 26일
편집: Greg Heath 2017년 7월 28일
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
Greg Heath
Greg Heath 2017년 7월 27일
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 2017년 7월 28일
@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

댓글을 달려면 로그인하십시오.


Abu Muaadh AlDrWiy
Abu Muaadh AlDrWiy 2017년 7월 27일
@ 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 2017년 7월 28일
편집: Greg Heath 2017년 7월 28일
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

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by