In this section, you will learn how you can implement and quickly evaluate a logistic regression model for your dataset. We will be using the same dataset that we have already cleaned and prepared for the purpose of predicting whether a particular transaction was fraudulent. In the previous chapter, we saved this dataset as fraud_detection.csv. The first step is to load this dataset into your Jupyter Notebook. This can be done by using the following code:
import pandas as pd
# Reading in the dataset
df = pd.read_csv('fraud_prediction.csv')