Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6597167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:10:27+00:00 2026-05-25T18:10:27+00:00

I have a confusion matrix such that: a b c d e f g

  • 0

I have a confusion matrix such that:

  a b c d e f g h i j
a 5 4 0 0 0 0 0 0 0 0
b 0 0 0 0 0 0 0 0 0 0
c 0 0 4 0 0 0 0 0 0 0
d 0 0 0 0 0 0 0 0 0 0
e 2 0 0 0 2 0 0 0 0 0
f 1 0 0 0 0 2 0 0 0 0
g 0 0 0 0 0 0 0 0 0 0
h 0 0 0 0 0 0 0 0 0 0 
i 0 0 0 0 0 0 0 0 0 0 
j 0 0 0 0 0 0 0 0 0 0 

where the letters denote the class labels.

I just need to plot the confusion matrix. I searched a couple of tools. Heatmaps in R looks like what I need. As I don’t know anything about R, it is really hard to do changes on the samples. If anybody could help me shortly how to draw, I will be really appreciated. Or any other suggestion rather than heatmaps are welcome as well.
I know there is plenty of samples about this, but still I cannot manage to draw with my own data.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:10:29+00:00Added an answer on May 25, 2026 at 6:10 pm

    As Greg mentioned, image is probably the way to go:

    z = c(5,4,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,
    0,0,4,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,
    2,0,0,0,2,0,0,0,0,0,
    1,0,0,0,0,2,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0)
    
    z = matrix(z, ncol=10)
    colnames(z) = c("a","b","c","d","e","f","g","h","i", "j")
    rownames(z) = c("a","b","c","d","e","f","g","h","i", "j")
    
    ##To get the correct image plot rotation
    ##We need to flip the plot
    image(z[,ncol(z):1], axes=FALSE)
    
    ##Add in the y-axis labels. Similar idea for x-axis.
    axis(2, at = seq(0, 1, length=length(colnames(z))), labels=colnames(z))
    

    You may also want to look at the heatmap function:

    heatmap(t(z)[ncol(z):1,], Rowv=NA,
                   Colv=NA, col = heat.colors(256))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

mmm, I have just a little confusion about multiple auto declarations in the upcoming
Let's assume that we have a simple matrix 3rows x 7cols. The matrix includes
I have a confusion that when i pass a variable by refrence in the
I have a confusion on some piece of code. Inside a class I have
I have a bit of confusion regarding the matrix row/column order of the CATransform3D
I have some confusion with singleton class, below are my some points: Can singleton
Hi new person to the wcf .. I have one confusion that if i
I have a small problem in coding confusion 3x3 matrix by using matlab... I
We have an application that stores a sparse matrix. This matrix has entries that
Possible duplicate Hello all. I have confusion in drop query that how actually it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.