July 2017
Intermediate to advanced
382 pages
9h 13m
English
For the sake of simplicity, we want to focus on a binary classification problem for now, where we only have two classes. The easiest way to do this is to discard all data points belonging to a certain class, such as class label 2, by selecting all the rows that do not belong to class 2:
In [9]: idx = iris.target != 2... data = iris.data[idx].astype(np.float32)... target = iris.target[idx].astype(np.float32)
Read now
Unlock full access