如何从起源开始sigmoid?
python中的Sigmoid函数有几种不同的实现X坐标轴。但是如何从x = 0开始?
There are several different implementations of sigmoid function in Python, but all of them started from negative x coordinate axis. But how to start it from x=0?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
这是一个数学问题,而不是一个python的问题。问题在于,Sigmoid函数从未真正“达到”零(假设您沿负方向沿它移动)。这称为渐近函数。
但是,您可以通过从其参数中添加或减去Sigmoid的中心。例如,Sigmoid(X-1)将在X轴上将Sigmoid的中心移至+1。您决定将其移动到的确切位置取决于您的应用程序,这是因为我先前解释的原因。在某些学科中,这可能是2%或5%,但这取决于您需要的内容。
This is more of a maths question than a Python question. The problem is that a sigmoid function never actually "reaches" zero (assuming you are moving along it in the negative direction). This is called an asymptotic function.
However, you can move the centre of the sigmoid by adding or subtracting from its argument. E.g. sigmoid(x-1) will move the centre of the sigmoid to +1 on the x axis. Where exactly you decide to move it to depends on your application, because of the reason I explained previously. In some disciplines this may be 2% or 5%, but it depends what you need it for.