在python中使用sigmoidal拟合的参数

时间:2017-06-13 13:04:56

标签: python-2.7

我用过

y = c / (1 + np.exp(-k*(x-x0))) + y0 
在python中

将sigmoid拟合成带点的曲线。谁能告诉我什么是parmeter" c"是指S形合适?

1 个答案:

答案 0 :(得分:0)

sigmoid的通用公式为1 / {1 + e**(-x)},其曲线如下:

enter image description here

通常,此曲线在范围[0, 1]之间被压缩。

现在,c是一个缩放因子。将曲线乘以c会导致曲线的上限增加。

enter image description here

如您所见,此曲线在y轴上的范围为[0, 10]

最后,我们将考虑相对于x轴的y0,它是偏移因子。总而言之,曲线c / (1 + e ** -x) + y0看起来像

enter image description here

Try it out yourself.