December 2018
Intermediate to advanced
318 pages
8h 28m
English
We use a dataset from the 2017 Black Hat conference. We will be doing some basic statistical testing to better understand the data:
data = pd.read_csv("https://s3-us-west-1.amazonaws.com/blackhat-us-2017/creditcard.csv")
data.head()The preceding code provides the data that has 31 columns in total.
We check for the target classes with a Histogram, where the x axis depicts the Class and the y axis depicts the Frequency, as shown in the following code:
count_classes = pd.value_counts(data['Class'], sort = True).sort_index()count_classes.plot(kind = 'bar')plt.title("Fraud class histogram")plt.xlabel("Class")plt.ylabel("Frequency")
Here is the output for the preceding code:
This histogram clearly shows that ...
Read now
Unlock full access