Answers for "sigmoid in python from scratch"

1

sigmoid in python from scratch

def sigmoid(x):
    return 1/(1 + np.exp(-x))
Posted by: Guest on February-08-2022
1

sigmoid in python from scratch

# Import matplotlib, numpy and math
import matplotlib.pyplot as plt
import numpy as np
import math
  
x = np.linspace(-10, 10, 100)
z = 1/(1 + np.exp(-x))
  
plt.plot(x, z)
plt.xlabel("x")
plt.ylabel("Sigmoid(X)")
  
plt.show()
Posted by: Guest on February-08-2022

Code answers related to "sigmoid in python from scratch"

Python Answers by Framework

Browse Popular Code Answers by Language