# Adding Confusion Matrix to report programatically

**URL:** <https://community.wandb.ai/t/adding-confusion-matrix-to-report-programatically/3267>\
**Category:** W&B Help\
**Tags:** wandb\
**Created:** [October 17, 2022, 6:22am UTC](https://community.wandb.ai/t/adding-confusion-matrix-to-report-programatically/3267 "2022-10-17T06:22:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinashaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.wandb.ai/kevinashaw/32/1016_2.png) [@kevinashaw](https://community.wandb.ai/u/kevinashaw)\
**Post date:** [October 17, 2022, 6:22am UTC](https://community.wandb.ai/t/adding-confusion-matrix-to-report-programatically/3267/1 "2022-10-17T06:22:44Z")

</div>

We are experimenting with programmatic report generation with WandB.  
I would like to be able to add a Confusion Matrix to a report, but this is not one of the base types (as far as I can tell). Is there a good way to do this?  
I could generate a PNG/Image and insert it, but I can’t figure out how to add an Image to a report yet (see recent question). Are there other ways?  
Thanks.

---

<div class="post-metadata">

**Author:** ![thanos-wandb](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@thanos-wandb](https://community.wandb.ai/u/thanos-wandb)\
**Post date:** [October 17, 2022, 2:06pm UTC](https://community.wandb.ai/t/adding-confusion-matrix-to-report-programatically/3267/2 "2022-10-17T14:06:09Z")

</div>

Hi @kevinashaw I am also posting here [this Colab](https://colab.research.google.com/drive/1Fepp-JLFvK-wLL2BZ_BnkCG_fAC6HFbo#scrollTo=An_example_with_all_of_the_blocks_and_panels) and the Python SDK commands of our [Reports reference docs](https://docs.wandb.ai/guides/reports/edit-a-report#add-plots) which may be helpful.

The confusion matrix isn’t [currently exposed](https://github.com/wandb/wandb/blob/main/wandb/apis/reports/panels.py) but I have increased this feature requests for our engineering team. We will reach out to you once this is implemented. I hope this helps, please let me know if you have any further questions or issues with the Reports API.

---

<div class="post-metadata">

**Author:** ![thanos-wandb](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@thanos-wandb](https://community.wandb.ai/u/thanos-wandb)\
**Post date:** [October 24, 2022, 12:58pm UTC](https://community.wandb.ai/t/adding-confusion-matrix-to-report-programatically/3267/3 "2022-10-24T12:58:47Z")

</div>

Hi @kevinashaw since the above was accepted as a solution, I will close this ticket and let you know once the confusion matrix is implemented to be directly used with the Reports API. In the meantime, only a static version of it can be used programmatically in the reports, provided you have downloaded the chart as PNG.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [December 23, 2022, 12:59pm UTC](https://community.wandb.ai/t/adding-confusion-matrix-to-report-programatically/3267/4 "2022-12-23T12:59:20Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
