Skip to main content

Sigmoid Function Simplified

 



                          Sigmoid function Equation


Definition 

Technical Wikipedia Definition A sigmoid function is a bounded, differentiable, real function that is defined for all real input values and has a non-negative derivative at each point and exactly one inflection point.

Simple Definition - It is basically a 'S' curve or activator function which is commonly used in Machine Learning, it is used to bound/transform/squash a wide range of values within [0,1].

Basic illustration of how Sigmoid Function works,

Defining the Input - Array containing 99999 equally spaced numbers between -10,10

Defining the Sigmoid Function


Plot of the transformed values - 

Graph between input and transformed output


                                        Distplot of the Transformed values

As we can see from the above plots the values are bounded between 0,1 for any given value.

Plot if it had been e^x instead of e^-x :


Now going back to the Technical Definition,

A sigmoid function is a bounded, differentiable, real function that is defined for all real input values and has a non-negative derivative at each point and exactly one inflection point


  • It has non-negative derivative at each point, the meaning of this statement is 

A Non-negative derivative means that the function is increasing, in other words increasing slope which can be seen from below figure -


  • Exactly one inflection point, means point on the graph of a function at which the concavity changes.
       Point of deflection occur where the second derivative is zero, in other                   words f '' = 0 

    


The above figure shows the graph of second derivative of Sigmoid function


Upon applying second derivative and storing the respective values in a dataframe. We can see that, the inputs are the 99999 equally spaced values between [-10,10] and col_1 are the respective output values. 

    


There is exactly one ZERO value which indicates that one inflection point like mentioned in the technical definition.













Comments

Popular posts from this blog

SQL Murder Mystery - Knight Lab

  SQL Murder mystery is a project by Knight Lab team. Which focusses on using SQL Queries to solve a case which involves in finding the killer behind a murder crime. This blog walks through the approach i did in order to find the killer behind this murder. So this is the Schema Diagram of the given tables, which we should use to figure out the killer. get_fit_now_check_in - this table gives information about checkin details of each member of the gym get_fit_now_member - this table contains information about the general details of a member of the gym person - this table contains information about the address details of the person drivers_license - this table contains information about the vehicle used by the person interview - this table contains the information regarding what the person revealed during the interview with the detectives facebook_event_checkin - this table contains information about the events the person attended and uploaded about on facebook crime_scene_report -

Cdf, Pdf and P - Value Explained

The probability density function ( pdf ) and cumulative distribution function ( cdf ) are two of the most important statistical functions in reliability and are very closely related. When these functions are known, almost any other reliability measure of interest can be derived or obtained. Figure 1 Figure 2 PDF - Probability Density Function or density  of a continuous random variable , is a function  whose value at any given sample (or point) in the sample space  (the set of possible values taken by the random variable) can be interpreted as providing a relative likelihood that the value of the random variable would equal that sample In a more precise sense , the PDF is used to specify the probability of a random variable falling within a particular range of values , as opposed to taking one value.   CDF -  cumulative distribution function  ( CDF ) of a real-valued random variable   X, or just  distribution function  of  X, evaluated at  x, is the probability  that  X will take