Machine-Learning-with-Iris-Dataset
Machine-Learning-with-Iris-Dataset copied to clipboard
ERROR: metrics has not been imported
metrics module has not been imported from sklearn before calculating the accuracy score
from sklearn.linear_model import LogisticRegression from sklearn import metrics
...
...
model = LogisticRegression() model.fit(train_X, train_y) prediction = model.predict(test_X) print('The accuracy of Logistic Regression is: ', metrics.accuracy_score(prediction, test_y))