S자형 곡선을 갖는 함수. (대표적인 예가 logistic function이나 sigmoid는 다음과 같이 여러 종류가 있음)

- Artificial Neural Network의 Artificial Neuron의 Activation function으로 초창기에 많이 사용되었음.
- Logistic distribution, normal distribution, student t distribution등의 probability distribution(확률 분포)들의 cumulative distribution function (cdf)이 바로 sigmoid function임.
- 때문에 sigmoid function에 대한 derivative는 normal distribution처럼 대칭이고 종모양의 분포를 보이는 함수임.

여러 종류의 function이 sigmoid function에 속하지만, 대표적 예는 logistic function임.
f(x)=11+e−x=exex+1
https://dsaint31.tistory.com/613
[Math] Derivative of Logistic Function
y=σ(x)=11+e−x 를 미분하면 다음과 같음. ddxσ(x)=σ(x)(1−σ(x)) graph 유도 유도는 다음과 같음. $$\begin{aligned}\frac{d}{dx}\sigma(x)&= -\dfrac{1}{(1+e^{-x})^2}e^{-x}(-1) \\ &= \frac{e^{-x}}{
dsaint31.tistory.com
Python Code
import numpy as np import matplotlib.pyplot as plt import seaborn as sns sns.set() x = np.linspace(-5,5, 100) y = 1 / (1 + np.exp(-x)) plt.plot(x,y) plt.title('logistic function') plt.xlabel(r'$x$') plt.ylabel(r'$\frac{1}{1+e^{-x}}$') plt.axhline(0.5, c='r', ls='--') plt.axvline(0., c='r', ls='--') plt.show()

Sigmoid for Activation Function (Logistiction Function에 대한 내용임)
- 함수에 exponential function (지수 함수)가 포함되어 있어서 연산 비용이 큰 편임.
- positive value만 출력하는 특성 및 양 끝단에서의 변화율이 0이라 Gradient vanishing이 발생하기 쉽고, 학습 속도도 느린 편임.
- 때문에, 최근의 ANN의 hidden layer에서는 거의 사용되지 않음.
- regression에서 range를 제한해야하는 경우 최종 출력단의 activation function으로 사용되거나, binary classification의 activation으로 사용됨.
1989년 Universal Approximation Theorem을 통해 Sigmoid를 activation으로 가지는 Nueral Network의 함수 모사 능력이 증명됨.
- sigmoid activation function을 가지면서
- 유한한 임의의 갯수의 neuron을 가진
- 한 hidden layer로 구성된 feedforward neural network 는 어떤 함수도 approximation(근사)할 수 있음
https://ds31x.blogspot.com/2023/08/dl-universal-approximation-theorem-uat.html?view=classic
DL : Universal Approximation Theorem (UAT)
Wikipedia 에 있는 설명은 다음과 같음. A feed-forward network with a single hidden layer contating a finite number of neurons can approximate arbitr...
ds31x.blogspot.com
관련자료들
https://dsaint31.tistory.com/320
[ML] Logit에서 Logistic Function.
Logit (또는 Log Odds) score를 이용한 classification이 바로 Logistic Regression임. (logistic function의 generalization은 softmax function임.) 달리 말하면, Logistic Regresson은 linear regression ω0+ω1x1+⋯+ωnxn으
dsaint31.tistory.com
2023.08.13 - [Computer] - [DL] Hyperbolic Tangent Function (tanh)
[DL] Hyperbolic Tangent Function (tanh)
logistic function과 함께 sigmoid의 대표적인 함수가 바로 tanh임. 값이 [−1,1]의 range를 가지며, logistic에 비해 기울기가 보다 급격하기 때문에 좀 더 빠른 수렴속도를 보임. 하지만, sigmoid의 일종
dsaint31.tistory.com
'... > Math' 카테고리의 다른 글
[Math] Random Variable (0) | 2023.03.09 |
---|---|
[Math] Taylor Expansion and Taylor Theorem (테일러 전개) (0) | 2023.02.27 |
[LA] Pseudoinverse Matrix (수정중) (0) | 2022.12.02 |
[Math] ill-posed, well-posed, ill-conditioned, well-conditioned matrix (or problem) (0) | 2022.12.02 |
[LA] 예제: Eigenvalue, Eigenvector 구하기 (0) | 2022.12.01 |