Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Logistic Functions

Reviewed by:
ffImage
hightlight icon
highlight icon
highlight icon
share icon
copy icon
SearchIcon

Logistic Function Explained

The logistic function is a special kind of exponential function which typically models the exponential growth of a population. The logistic function also takes into account certain factors like the carrying capacity of land keeping in consideration that a definite area simply won't reinforce unlimited growth since when one population grows, its resources reduce. So a logistic function basically puts a limit on growth. In other words, a logistic function is exponential for olden days, but the growth declines as it reaches some limit.


Interpretation of Logistic Function

Mathematically, the logistic function can be written in a number of ways that are all only moderately distinctive of each other. In this interpretation below,

S (t) = the population ("number") as a function of time,

t. t0 = the starting time, and the term (t - to) is just an adjustable horizontal translation of the logistic function.

B = criterion that influences the rate of exponential growth

K= the asymptote in horizontal or the limit on the population size

S(t) = \[\frac{K}{(1+e^{-b(t-t_{0})})}\]


Meaning of Logistic Growth

Logistic growth can be easily delineated with a logistic equation. The logistic equation is of the mathematical form where the letters in the equation are constants that can also be adjusted/altered to match the condition being modeled. For the image below, you will have to solve for L, A, and E with the detail that is assigned to you in each problem. The constant L is specifically important since it is the limit to growth which is also frequently known as the carrying capacity. 

(Image to be added soon)

The below given logistic function graph bears a carrying capacity of 10 which can be clearly seen from its graph. 

(Image to be added soon)


Why Sigmoid Function For Logistic Regression

So, one of the outstanding properties of logistic regression function is that the outputs of  sigmoid function results in the conditional probabilities of the anticipation, the class probabilities. So, let’s understand how it works? Let’s begin with the supposedly “odds ratio” p / (1 - p), which puts in detail the ratio between –the probability that a definite, positive, event happens and the probability that it doesn’t happen – where positive refers to the “event that we would want to anticipate”, which is., p(y=1 | x).


Difference Between Logistic Function & Sigmoid Function

To have a better understanding of sigmoid in logistic function let’s get to learn

Logistic function vs. sigmoid function.

So,


What Is Sigmoid?

A Sigmoid is a standard category of curves that “are S-shaped”. That’s the best way you can understand the sigmoid. In maths, we frequently use the term sigmoid to make reference to the logistic function, but that's actually only one example of a sigmoid. You should know that the “tanh function” also describes a sigmoid curve.

Tanh:

Equation:

F (x) = {ex} − e− {xex} + {e−x}

Range:

Break down the values in (−1,1) , 

0 at x = 0


Reason For Use in Machine Learning:

It gained eminence as an activation function in neural networks as a significant substitute to the logistic function. It was also empirically discovered to steer to quicker convergence, debatably because of being anti-symmetric & zero-centralized and about the origin. It too suffers from disappearing gradients.

Let’s get going to use it for 1 billion ordinary random numbers in MATLAB

Gives off:-

7.80 seconds

 

What is Logistic?

Logistic is a way of Getting a Solution to a differential equation by attempting to model population growth in a module with finite capacity. This is to say, it models the size of a population when the biosphere in which the population lives in has finite (defined/limited) resources and can only support population up to a definite size.

Equation

F (x) =11+ e−x

Range:

Break down the values in (0, 1)


Reason For Use in Machine Learning

Conceptually optimal “activation” functions for “logistic regression” and Probability.

It also took immense recognition as an activation function because of its easy-to-calculate derivative:  f′(x) = f (x) × (1−f(x)} and its range of (0,1) . It does suffer from disappearing gradients too.

Let’s get going to use it for 1 billion ordinary random numbers in MATLAB (multi-paradigm Computer programming language)

Gives off:-

5.09 seconds


Solved Example

Problem1:

Find out the logistic model mentioned hereunder c=7 and the points (0, 2) and (3, 5).

The 2 points provide 2 equations, and the logistic model has in possession two variables. Use the given points to solve for M and N.

Solution1:

2= 7/1+M

1+M = 7/2

Thus, M = 2.5

5 = 7/ 1+ (2.5) . N3

1+ (2.5) . N3 =7/5

N3= 0.16

N ~ 0.54329

 Hence, the estimated model is

f (x) = 7/ 1+ (2.5) . (0.54329) x  


 Fun Facts

  • logistic regression is basically a unique kind of sigmoid function

  • The logistic sigmoid as well as other sigmoid functions exists, for example, the hyperbolic tangent).

FAQs on Logistic Functions

1. What is a logistic function and what does it typically represent?

A logistic function is a mathematical equation that produces a characteristic S-shaped curve, also known as a sigmoid curve. It is used to model phenomena that start with slow growth, accelerate, and then slow down as they approach a maximum limit or saturation point. This makes it ideal for representing scenarios with constraints, such as population growth with limited resources or the spread of information in a finite community.

2. What is the standard formula for a logistic function?

The standard formula for a logistic function is:
f(x) = L / (1 + e-k(x - x₀))
Where:

  • L is the carrying capacity, or the maximum value the function can reach.
  • e is the base of the natural logarithm.
  • k is the steepness or growth rate of the curve.
  • x₀ is the x-value of the sigmoid's midpoint, where the growth is fastest.
This formula is fundamental to understanding how various factors control the shape and limits of the growth curve.

3. What are some real-world examples of logistic functions in action?

Logistic functions are used to model various real-world phenomena. Some common examples include:

  • Population Growth: Modeling how a population of animals or bacteria grows in an environment with limited food and space. This is a classic application in biology, often called the Verhulst-Pearl Logistic Growth model.
  • Spread of Diseases: Describing how an epidemic spreads through a population, initially rapidly and then slowing as more people become immune.
  • Chemical Reactions: Showing the progression of certain autocatalytic reactions where the product itself is a catalyst.
  • Machine Learning: The logistic function is the core of logistic regression, a method used for binary classification problems.

4. How does a logistic function model population growth more realistically than an exponential function?

An exponential function models unrestricted growth, assuming infinite resources. This is unrealistic in most ecosystems. A logistic function is more realistic because it incorporates the concept of carrying capacity (L).

  • Initial Phase: At the start, when the population is small, the logistic curve closely resembles an exponential curve, showing rapid growth.
  • Limiting Factors: As the population increases, it consumes resources, and factors like limited food, space, and increased competition start to slow down the growth rate.
  • Saturation: The growth rate approaches zero as the population nears the carrying capacity, resulting in the curve flattening at the top. This realistic portrayal of resource limitation is a key advantage of the logistic growth model.

5. What is the difference between a logistic function and a sigmoid function?

The terms "logistic function" and "sigmoid function" are often used interchangeably, but there's a subtle distinction. A sigmoid function is any mathematical function having a characteristic "S"-shaped curve. The logistic function is the most common and well-known *type* of sigmoid function. Essentially, all logistic functions are sigmoid functions, but not all sigmoid functions are logistic functions. Other examples of sigmoid functions include the Gompertz curve and the hyperbolic tangent function (tanh), each with slightly different properties and mathematical forms. The defining feature of all these is their S-shaped curvature.

6. How is the logistic function derived from a differential equation?

The logistic function is the solution to a specific type of differential equation known as the logistic differential equation. This equation states that the rate of change of a quantity P with respect to time t (dP/dt) is proportional to both the current amount (P) and the difference between the carrying capacity (L) and the current amount (L-P). The equation is:
dP/dt = rP(1 - P/L)
Here, 'r' is the growth rate. This is a first-order, non-linear, ordinary differential equation. By using the method of separation of variables, one can solve this equation to obtain the standard logistic function formula.

7. What is the significance of the derivative of a logistic function?

The derivative of a logistic function represents the rate of growth at any given point in time (x). A key feature of the derivative is that it is not constant.

  • It is small at the beginning, indicating slow initial growth.
  • It reaches its maximum value at the inflection point of the S-curve (at x = x₀, or half the carrying capacity), which signifies the point of fastest growth.
  • It decreases and approaches zero as the function nears its carrying capacity (L), indicating that growth is slowing down and stopping.
Therefore, the derivative helps identify the exact moment when the growth is at its peak.

8. What is a logistic decay function, and how does it differ from a growth function?

A logistic decay function models a process that starts at a certain level and decreases over time, eventually levelling off at a minimum value, often zero. It is essentially the inverse of a logistic growth curve, resembling a flipped 'S'. While a growth function models processes like population increase, a decay function could model:

  • The decline in the market share of an obsolete product.
  • The decrease in the concentration of a substance that is being consumed in a reaction.
  • The eradication of a disease in a population after intervention.
The key difference is the direction of change: growth moves from a minimum towards a maximum, while decay moves from a maximum towards a minimum.