S型函数

S型函數的曲線圖形
S型函數在複數域的分布圖形

S型函数(英語:sigmoid function,或稱乙狀函數)是一種函数,因其函數圖像形状像字母S得名。其形狀曲線至少有2個焦點,也叫“二焦點曲線函數”。S型函数是有界可微的实函数,在实数范围内均有取值,且导数恒为非负[1],有且只有一个拐点。S型函数和S型曲线指的是同一事物。

逻辑斯谛函数是一种常见的S型函数,其公式如下:[1]

S ( t ) = 1 1 + e t . {\displaystyle S(t)={\frac {1}{1+e^{-t}}}.}

其级数展开为:

s := 1 / 2 + 1 4 t 1 48 t 3 + 1 480 t 5 17 80640 t 7 + 31 1451520 t 9 691 319334400 t 11 + O ( t 12 ) {\displaystyle s:=1/2+{\frac {1}{4}}t-{\frac {1}{48}}t^{3}+{\frac {1}{480}}t^{5}-{\frac {17}{80640}}t^{7}+{\frac {31}{1451520}}t^{9}-{\frac {691}{319334400}}t^{11}+O(t^{12})}

其他S型函數案例見下。在一些學科領域,特別是人工神经网络中,S型函數通常特指邏輯斯諦函數。

常見的S型函數

一些S型函數的比較,圖中的函數皆以原點斜率為1的方式歸一化。
f ( x ) = 1 1 + e x {\displaystyle f(x)={\frac {1}{1+e^{-x}}}}
f ( x ) = tanh x = e x e x e x + e x {\displaystyle f(x)=\tanh x={\frac {e^{x}-e^{-x}}{e^{x}+e^{-x}}}}
f ( x ) = arctan x {\displaystyle f(x)=\arctan x}
f ( x ) = gd ( x ) = 0 x 1 cosh t d t = 2 arctan ( tanh ( x 2 ) ) {\displaystyle f(x)=\operatorname {gd} (x)=\int _{0}^{x}{\frac {1}{\cosh t}}\,dt=2\arctan \left(\tanh \left({\frac {x}{2}}\right)\right)}
f ( x ) = erf ( x ) = 2 π 0 x e t 2 d t {\displaystyle f(x)=\operatorname {erf} (x)={\frac {2}{\sqrt {\pi }}}\int _{0}^{x}e^{-t^{2}}\,dt}
  • 廣義邏輯斯諦函數英语Generalised logistic function
f ( x ) = ( 1 + e x ) α , α > 0 {\displaystyle f(x)=(1+e^{-x})^{-\alpha },\quad \alpha >0}
  • 平滑階躍函數英语Smoothstep
f ( x ) = { 0 x ( 1 u 2 ) N   d u 0 1 ( 1 u 2 ) N   d u , | x | 1 sgn ( x ) | x | 1 N 1 {\displaystyle f(x)={\begin{cases}\displaystyle {\frac {\int _{0}^{x}{\bigl (}1-u^{2}{\bigr )}^{N}\ du}{\int _{0}^{1}{{\bigl (}1-u^{2}{\bigr )}^{N}\ du}}},&|x|\leq 1\\\operatorname {sgn}(x)&|x|\geq 1\\\end{cases}}\,\quad N\geq 1}
f ( x ) = x 1 + x 2 {\displaystyle f(x)={\frac {x}{\sqrt {1+x^{2}}}}}

所有連續非負的凸形函數的積分都是S型函數,因此許多常見概率分布累积分布函数會是S型函數。一個常見的例子是误差函数,它是正态分布的累积分布函数。

参考文献

  1. ^ 1.0 1.1 Han, Jun; Morag, Claudio. The influence of the sigmoid function parameters on the speed of backpropagation learning. Mira, José; Sandoval, Francisco (编). From Natural to Artificial Neural Computation. Lecture Notes in Computer Science 930. 1995: 195–201. ISBN 978-3-540-59497-0. doi:10.1007/3-540-59497-3_175. 
  • Mitchell, Tom M. Machine Learning. WCB–McGraw–Hill. 1997. ISBN 0-07-042807-7. . In particular see "Chapter 4: Artificial Neural Networks" (in particular pp. 96–97) where Mitchell uses the word "logistic function" and the "sigmoid function" synonymously – this function he also calls the "squashing function" – and the sigmoid (aka logistic) function is used to compress the outputs of the "neurons" in multi-layer neural nets.
  • Humphrys, Mark. Continuous output, the sigmoid function. [2015-02-01]. (原始内容存档于2015-02-02).  Properties of the sigmoid, including how it can shift along axes and how its domain may be transformed.

参见

维基共享资源上的相关多媒体资源:S型函数
可微分计算
概论
概念
应用
硬件
  • TPU
  • VPU
  • IPU英语Graphcore
  • 憶阻器
  • SpiNNaker英语SpiNNaker
软件库
实现
视觉·语音
自然语言
决策
人物
组织
架构
  • 主题 主题
    • 计算机编程
    • 技术
  • 分类 分类
    • 人工神经网络
    • 机器学习