sigmoid函数
之前看了一篇文章,里面需要编辑一个公式
这个公式我在其他论文里也有见过。在用matlab实现这个公式时,我发现在matlab中,没有直接的sigmoid函数,而是通过设置sigmf函数的相关参数,得到sigmoid函数的效果:
以下内容摘自MATLAB的help文件。
sigmf
Sigmoidally shaped built-in membership function
Syntax
y = sigmf(x,[a
c])
Description
The sigmoidal function, sigmf(x,[a
c]), as given in the following equation by f(x,a,c) is a mapping on
a vector x, and depends on two parameters a and
c.
Depending on the sign of the parameter a, the
sigmoidal membership function is inherently open to the right or to
the left, and thus is appropriate for representing concepts such as
"very large" or "very negative." More conventional-looking
membership functions can be built by taking either the product or
difference of two different sigmoidal membership functions. For
more information
seedsigmf and psigmf.
相对于上面提到的公式,sigmf函数中,a=1,c=0;
即sigmoid(x)=sifmf(x,[1,0])