FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Python sigmoid()
How-ToWeb Development

Python sigmoid()

via Dev.to Tutorialslackman1mo ago

$$ f(x) = \frac{1}{ (1 + e^{-x}) } $$ $$ f'(x) = f*(1-f) $$ pip install numpy matplotlib sympy import numpy as np import matplotlib.pyplot as plt import sympy as sp x = sp.Symbol('x') f1 = 1 / (1 + sp.exp(-1*x)) df1 = sp.diff(f1, x) f1 = sp.lambdify(x, f1, 'numpy') df1 = sp.lambdify(x, df1, 'numpy') x = np.linspace(-10, 10, 400) y = f1(x) y_df = df1(x) plt.figure(figsize=(8, 5)) # 1行2列 plt1 = plt.subplot(1,2,1) plt2 = plt.subplot(1,2,2) plt1.plot(x, y, label='f(x)', color='blue') plt2.plot(x, y_df, label='df(x)', color='red') plt1.grid() plt2.grid() plt1.legend() plt2.legend() plt.show()

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
27 views

Related Articles

What Is Computer Science? (Learn This Before It’s Too Late)
How-To

What Is Computer Science? (Learn This Before It’s Too Late)

Medium Programming • 4d ago

how to make programming terrible for everyone
How-To

how to make programming terrible for everyone

Lobsters • 4d ago

Rob Pike’s 5 Rules: The Secret to Building Systems That Actually Survive Production
How-To

Rob Pike’s 5 Rules: The Secret to Building Systems That Actually Survive Production

Medium Programming • 4d ago

Bipolar and Sleep Deprivation: What Actually Happens
How-To

Bipolar and Sleep Deprivation: What Actually Happens

Dev.to • 4d ago

Learn how to develop like a pro for free
How-To

Learn how to develop like a pro for free

Medium Programming • 4d ago

Discover More Articles