Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sigmoid function in vb.net 2005 1

Status
Not open for further replies.

Aggelikoula

Programmer
Jan 17, 2017
4
GR
Hello everyone, I wonder if the sigmoid function is provided by a dll in vb.net 2005. I want to use it in my code, I would like an example if it is possible for someone to explain me each symbol to understand it better and in case it doesn't exist in a library, so that to understand it better, to create it by my own. I would like to know if this function is provided and the library I can find it, in order to include it in my project and to use it of course.
Any help will be much appreciated. Thank you so much in advanced.
 
You can easily create a function in VB to do this:

Private Function sigmoid(ByVal x As Double) As Double
Dim dRetVal As Double​
dRetVal = 1/(1 + Math.Exp(-1 * x))​
Return dRetVal​
End Function

Math.Exp(d As Double) is a VB function returns e raised to the power of d.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Thank you very much, may you explain me, what exactly represents e raised to the power of d? What symbolizes e and d?
Does it calculate an error? I want to use it, in a neural network, in order to serve the purpose of calculating the error, between 2 situations. To be more specific. I have an array that holds positions of another array.
For example:
Positions(i).FromPos1=X
Positions(i).ToPos1=X1
Positions(i).FromPos2=Y
Positions(i).ToPos2=Y2
That represents an element of Vector or Positions, for example vector(j)=Positions(i) where Vector is the array that holds the positions and each Vector(j) is a terminal situation. The initial situation seems like InitialPositions(i).Position which is in the terminal situation Positions(i).FromPos1 or Positions(i).FromPos2, depending the element that is moving from one to the other position. So, I want to calculate the error between these situations so that to produce later the right output of my network. May you explain me about the sigmoid function in general about the symbols e,d and more specific in that case about what they represent? Thank you so much, in advanced.

 
Your question is a bit beyond my mathematical abilities. [smarty]

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top