In [1]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
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]:
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]:
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]:
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]:
In [41]:
plt.plot(x0_quart, 'rx')
plt.plot(x1_quart, 'go')
Out[41]:
In [ ]: