How to make confusion Matrix, sklearn style in Alteryx
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I have a confusion matrix like this
And I wish to make it like the following image (from w3schools) in Alteryx, is that possible
https://www.w3schools.com/python/img_ml_confusion_matrix.png
Thanks!
Solved! Go to Solution.
- Labels:
- Machine Learning
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @Hagar-Usama
If you reshape your data using a transpose and a formula tool to parse the Result and Type of result:
Then you can take this into the interactive chart tool.
You'll want to use a Heatmap layer with Result as your X, Type of Result as your Y and Value as your Z
Under Layer, you'll want to choose your colourscale, set the Display Range to auto (if you want different ranges per input row, or you can set it to custom to set your own across all input rows) and ensure the colour bar is visible
Finally under batch, ensure you're batching your charts by the Row to get 2 separate charts with an independent colour scale
I couldn't figure out how to label the squares unfortunately though
Hope that helps,
Ollie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks @OllieClarke, seems perfect to me
However, I followed the same steps but got different output. And how I got 'row' column
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Hagar-Usama I added a row because in your input you had 2 rows of data. You can use a recordID tool before the transpose tool, use ReocrdID as a key field, and the other 4 as data fields, thenceforth replace all my references to row with RecordID (or change the name of the column created in the RecordID tool to be row).
Ensure you run the workflow before you input the interactive chart tool
Hope that helps,
Ollie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Great stuff @OllieClarke !
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi how do you create your confusion matrix in that current form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Do you mean the table I attached in my post?
