|
2 | 2 | The :mod:`scikitplot.metrics` module includes plots for machine learning
|
3 | 3 | evaluation metrics e.g. confusion matrix, silhouette scores, etc.
|
4 | 4 | """
|
5 |
| -from __future__ import absolute_import, division, print_function, \ |
6 |
| - unicode_literals |
| 5 | +from __future__ import ( |
| 6 | + absolute_import, division, print_function, unicode_literals |
| 7 | +) |
7 | 8 |
|
8 | 9 | import itertools
|
9 | 10 |
|
|
28 | 29 | from scikitplot.helpers import cumulative_gain_curve
|
29 | 30 |
|
30 | 31 |
|
31 |
| -def plot_confusion_matrix(y_true, y_pred, labels=None, true_labels=None, |
32 |
| - pred_labels=None, title=None, normalize=False, |
33 |
| - hide_zeros=False, hide_counts=False, x_tick_rotation=0, ax=None, |
34 |
| - figsize=None, cmap='Blues', title_fontsize="large", |
35 |
| - text_fontsize="medium", show_colorbar=True): |
| 32 | +def plot_confusion_matrix( |
| 33 | + y_true, y_pred, labels=None, true_labels=None, |
| 34 | + pred_labels=None, title=None, normalize=False, |
| 35 | + hide_zeros=False, hide_counts=False, x_tick_rotation=0, ax=None, |
| 36 | + figsize=None, cmap='Blues', title_fontsize="large", |
| 37 | + text_fontsize="medium", show_colorbar=True, |
| 38 | +): |
36 | 39 | """Generates confusion matrix plot from predictions and true labels
|
37 | 40 |
|
38 | 41 | Args:
|
|
0 commit comments