Compute specificity with logistic regression model

#the model predicted rejected and the student was rejected true_negatives = len(admissions[(admissions["predicted_label"] == 0) & (admissions["actual_label"] == 0)]) #the model predicted admitted but the student was actually rejected false_positives = len(admissions[(admissions["predicted_label"] == 1) & (admissions["actual_label"] == 0)]) specificity= true_negatives / (true_negatives + false_positives )
The dataset is about graduate school admissions.
Specificity or True Negative Rate is the proportion of applicants that were correctly rejected.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.