mrdbourke / tensorflow-deep-learning

All course materials for the Zero to Mastery Deep Learning with TensorFlow course.
https://dbourke.link/ZTMTFcourse
MIT License
5.16k stars 2.53k forks source link

Update function make_confusion_metrix to have vertical xticklables #674

Open jaypat7828 opened 2 weeks ago

jaypat7828 commented 2 weeks ago

Thank you much for guiding through the Tensorflow course very systematically. I have learned a good deal.

I found the 'make_confusion_matrix' function very useful.

here is the scenario:

`y_true = ["countryman rambo", "neighboring man jumbo", "countryman rambo", "countryman rambo", "neighboring man jumbo", "birdman", "superman", "logicalman"] y_pred = ["neighboring man jumbo", "neighboring man jumbo", "countryman rambo", "countryman rambo", "neighboring man jumbo", "countryman rambo", "superman", "logicalman"] labels = ["countryman rambo", "neighboring man jumbo", "birdman", "superman", "logicalman"]

make_confusion_matrix_old( y_true, y_pred, labels, figsize=(8, 8), )`

image

when the confusion matrix comes out nicely but the Xlabes needs some help.

I have updated the code and here is the new version.

image

Thanks,

Jaydip