04pallav
9/11/2017 - 10:23 PM

model.score

model.score

It takes a feature matrix X_test and the expected target values y_test. 
Predictions for X_test are compared with y_test and either ACCURACY (for classifiers) 
or R² score (for regression estimators is returned.

model = LogisticRegression()
model = model.fit(X_train, y_train)

# check the accuracy on the training set
model.score(X_train, y_train)

ACCURACY is the proportion of true results (both true positives and true negatives) 
among the total number of cases examined