mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-23 20:11:10 +00:00
Fix README.md
This commit is contained in:
parent
bd842f4a2b
commit
2ab7ecf91d
|
@ -1,24 +1,25 @@
|
|||
# CODE BY ZeroToMastery TensorFlow course.
|
||||
# The function makes a labelled confusion matrix comparing predictions and ground truth labels.
|
||||
The function makes a labelled confusion matrix comparing predictions and ground truth labels.
|
||||
|
||||
# If classes is passed, confusion matrix will be labelled, if not, integer class values
|
||||
# will be used.
|
||||
If classes is passed, confusion matrix will be labelled, if not, integer class values will be used.
|
||||
|
||||
## Args:
|
||||
Args:
|
||||
|
||||
`y_true`: Array of truth labels (must be same shape as y_pred).
|
||||
`y_pred`: Array of predicted labels (must be same shape as y_true).
|
||||
`classes`: Array of class labels (e.g. string form). If `None`, integer labels are used.
|
||||
`figsize`: Size of output figure (default=(10, 10)).
|
||||
`text_size`: Size of output figure text (default=15).
|
||||
`norm`: normalize values or not (default=False).
|
||||
`savefig`: save confusion matrix to file (default=False).
|
||||
* `y_true`: Array of truth labels (must be same shape as y_pred).
|
||||
* `y_pred`: Array of predicted labels (must be same shape as y_true).
|
||||
* `classes`: Array of class labels (e.g. string form). If `None`, integer labels are used.
|
||||
* `figsize`: Size of output figure (default=(10, 10)).
|
||||
* `text_size`: Size of output figure text (default=15).
|
||||
* `norm`: normalize values or not (default=False).
|
||||
* `savefig`: save confusion matrix to file (default=False).
|
||||
|
||||
Returns: A labelled confusion matrix plot comparing y_true and y_pred.
|
||||
|
||||
## Returns: A labelled confusion matrix plot comparing y_true and y_pred.
|
||||
### Example usage:
|
||||
|
||||
"""make_confusion_matrix(y_true=test_labels, # ground truth test labels
|
||||
> """make_confusion_matrix(y_true=test_labels, # ground truth test labels
|
||||
y_pred=y_preds, # predicted labels
|
||||
classes=class_names, # array of class label names
|
||||
figsize=(15, 15),
|
||||
text_size=10)"""
|
||||
|
||||
#### CODE BY ZeroToMastery TensorFlow course.
|
||||
|
|
Loading…
Reference in New Issue
Block a user