New Blog Post

Confusion Matrix

Too confused of the confusion matrix? Let me bring some clarity into this topic! Let’s take the example from Precision and Recall: y_true = [“dog”, “dog”, “non-dog”, “non-dog”, “dog”, “dog”] y_pred = [“dog”, “non-dog”, “dog”, “non-dog”, “dog”, “non-dog”] When we look at the prediction we can count the correct and incorrect classifications: dog correctly classified…

New Blog Post

numpy random choice

With numpy you can easily create test data with random_integers and randint. numpy.random.randint(low, high=None, size=None, dtype=’l’) numpy.random.random_integers(low, high=None, size=None) random_integers includes the high boundary while randint does not. >>> import numpy as np >>> np.random.random_integers(5) 4 >>> np.random.random_integers(5, size=(5)) array([5, 3, 4, 1, 4]) >>>np.random.random_integers(5, size=(5, 4)) array([[2, 3, 3, 5], [1, 3, 1, 3],…