<jupyter_start><jupyter_text>let's build a confusion matrix!- A confusion matrix is a table that is often used to describe the performance of a classification model (or "classifier") on a set of test data for which the true values are known.<jupyter_code>pd.crosstab(y_test, preds, rownames=['Actual Result'], colnames=['Predicted Result'])<jupyter_output><empty_output><jupyter_text>false negative is dangerous in the lending business because we would rather not give loans out to people than give loans to 28 people that will default<jupyter_code>roc_auc_score(y_test, preds)<jupyter_output><empty_output><jupyter_text>plot the roc curve- An ROC curve (receiver operating characteristic curve) is a graph showing the performance of a classification model at all classification thresholds. This curve plots two parameters:    1. True Positive Rate    2. False Positive Rate- Learn more here: https://developers.google.com/machine-learning/crash-course/classification/roc-and-auc<jupyter_code>y_prob = np.concatenate(((1-preds).reshape(-1,1),(preds).reshape(-1,1)), axis = 1)
skplt.metrics.plot_roc(y_test, y_prob)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09264069264069263, 'fraction_numerical': 0.008658008658008658, 'mean_word_length': 6.5064935064935066, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '539329', 'license': 'MIT', 'n_tokens_mistral': 359, 'n_tokens_neox': 341, 'n_words': 117, 'path': 'Section 1/1.5.ipynb', 'repo_name': 'PacktPublishing/Hands-On-Feature-Engineering-with-Python', 'size': '1155'}