import numpy as np
from sklearn.datasets import load_iris
from sklearn.linear_model import Perceptron

#importando dataset

iris =load_iris()
X = iris.data[:,(2,3)] # comprimento da pétala, largura da pétala
y = (iris.target == 0).astype(np.int) # Irs setosa?

per_clf = Perceptron(random_state = 42); 
per_clf.fit(X,y)


y_pred = per_clf.predict([[2,0.5]])

print(y_pred)
