trigonometry


heading


In [1]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

Cosh, Sinh, Tanh

with rectangualr hyperbola


In [6]:
x = np.linspace(0,1,100)
x2 = np.square(x)
y = np.sqrt(1- x2)

In [7]:
plt.plot(x,y)


Out[7]:
[<matplotlib.lines.Line2D at 0x119e05d68>]

In [8]:
from sklearn.neural_network import MLPClassifier
from sklearn.datasets import make_moons

In [9]:
X,y = make_moons(noise=0)

In [16]:
len(X)


Out[16]:
100

In [34]:
x0 = list(map(lambda x:x[0], X))
x1 = list(map(lambda x:x[1], X))

In [35]:
plt.scatter(x0,x1)


Out[35]:
<matplotlib.collections.PathCollection at 0x11c8b4b70>

In [36]:
X_quart,y_quart = make_moons(noise=0.25)
x0_quart = list(map(lambda x:x[0], X_quart))
x1_quart = list(map(lambda x:x[1], X_quart))


Out[36]:
<matplotlib.collections.PathCollection at 0x11c90dfd0>

In [41]:
plt.plot(x0_quart, 'rx')
plt.plot(x1_quart, 'go')


Out[41]:
[<matplotlib.lines.Line2D at 0x11cdb7358>]

In [ ]: