You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 KiB
16 KiB
None
<html lang="en">
<head>
</head>
</html>
In [1]:
import numpy as np
import pandas as pd
x = np.arange(-4,4)
def sigmoid(x):
e = np.exp(-x)
return np.divide(1,e + e)
df = pd.DataFrame({"x":x,"tanh":np.tanh(x),"sigmoid":sigmoid( np.tanh(x))})
In [10]:
df[['tanh','sigmoid']].plot()
Out[10]:
In [ ]: