How it works...
In Step 1, we loaded the required libraries. Then, we loaded the CSV data, downloaded from Kaggle (available at https://www.kaggle.com/mlg-ulb/creditcardfraud) into Python, using the pd.read_csv function.
The dataset we selected for this exercise contains information about transactions made by credit cards in September 2013 by European cardholders. The transactions happened within a period of 2 days. All the numerical variables with a name starting with V are the principal components, obtained by running the PCA on the original dataset (original features are not included, due to confidentiality). The only two features with clear interpretation are Time (seconds elapsed between each transaction and the first transaction in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access