November 2019
Intermediate to advanced
346 pages
9h 36m
English
In the following steps, you will download a labeled dataset of counterfeit and legitimate bank notes and construct a classifier to detect counterfeit currency:
import pandas as pddf = pd.read_csv("data_banknote_authentication.txt", header=None)df.columns = ["0", "1", "2", "3", "label"]
The following is the output:
feature 1 feature 2 feature 3 feature 4 label0 3.62160 8.6661 -2.8073 -0.44699 01 4.54590 8.1674 -2.4586 -1.46210 02 3.86600 -2.6383 1.9242 0.10645 03 3.45660 9.5228 -4.0112 -3.59440 04 0.32924 -4.4552 4.5718 -0.98880 0
from sklearn.model_selection import train_test_split