如何从起源开始sigmoid?

发布于 2025-01-30 12:52:20 字数 156 浏览 4 评论 0原文

所需的图形

python中的Sigmoid函数有几种不同的实现X坐标轴。但是如何从x = 0开始?

Desired graph

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

菊凝晚露 2025-02-06 12:52:20

这是一个数学问题,而不是一个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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文