Professional Documents
Culture Documents
import numpy as np
dataset = datasets.load_iris()
I am skipping these steps for now. You can read this article, if you want to learn exploratory analysis.
Step 3: Build a logistic regression model on the dataset and making predictions
model.fit(dataset.data, dataset.target)
expected = dataset.target
predicted = model.predict(dataset.data)
print(metrics.classification_report(expected, predicted))
print(metrics.confusion_matrix(expected, predicted))