Skip to content

ERROR: metrics has not been imported #2

@thisisashwinraj

Description

@thisisashwinraj

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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions