August 2018
Intermediate to advanced
522 pages
12h 45m
English
A classification task can be evaluated in many different ways to achieve specific objectives. Of course, the most important metric is the accuracy, often expressed as follows:

For this example, we are going to use a binary test dataset obtained as follows:
from sklearn.datasets import make_classificationfrom sklearn.model_selection import train_test_splitX, Y = make_classification(n_samples=nb_samples, n_features=2, n_informative=2, n_redundant=0, n_clusters_per_class=1, random_state=1000)X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.25, random_state=1000)
In scikit-learn, the accuracy can be ...
Read now
Unlock full access