A classifier does not output a class, it outputs a score per class. Turning that into an accuracy number is two operations, and getting the axis wrong in either of them gives you a plausible-looking number that means nothing.
Write accuracy(scores, labels).
scores is a 2D array of shape (n_samples, n_classes): row i holds the model's score for each class on sample i. labels is a 1D array of n_samples true class indices.
You have read the opening. The rest is free with a Bezen account, and no card is needed.
Behind the sign-in