These questions are non-graded.
In the last segment, you saw that the optimal cut-off for the model turned out to be 0.3. Now, in order to assess the model, you need to re-run the predictions on the train set using the cut-off of 0.3. Recall when you did this using the cut-off of 0.5, you used the following code:
# Creating new column 'predicted' with 1 if Churn_Prob > 0.5 else 0
y_train_pred_final['predicted'] = y_train_pred_final.Churn_Prob.map(lambda x: 1 if x > 0.5 else 0)
Now, using the same code with just the cut-off value changed, calculate all the metrics (accuracy, sensitivity, specificity) and answer the questions below.
If you want the solution to these questions, the code has been provided in the Logistic Regression Jupyter Notebook that you downloaded. It is present below the plotted trade-off curve, although it is recommended that you write the code and attempt these questions on your own before looking at the given code.
Report an error