Header to rownames and column names. How to display dimension names in a result? In other words, is there any function in MATLAB as dnn option of table() in R? I want to have the table output as shown in the image.

조회 수: 2 (최근 30일)
I want to output a confusion matrix with row names, variable names and dimension names as shown in the image.I figured out that it is easier to convert it to table and add row names and variable names. I tried appending the Properties.DimensionNames of table() but still I couldn't get those dimension names in the output. I would appreciate any help, thanks!

채택된 답변

Amy
Amy 2017년 10월 27일
Hi Suyash,
I couldn't think of a way to include table dimension names in output, but since you are working with confusion matrices, have you considered using the plotconfusion function to plot your data instead of using a table? You could plot your data, and then change the x- and y-axis labels and tick labels to match your row, variable and dimension names.
  댓글 수: 1
Suyash Dewangan
Suyash Dewangan 2017년 10월 27일
Hi Amy,
Thank you for replying to my query. I believe plotting a confusion matrix would require me to tweak the data to feed it into plotconfusion and moreover, I don't want the column total and row total element in the matrix. That's a good suggestion though. However, I figured out to get the desired output by throwing a table to a figure window using uitable and controlling the axes and figure properties. The only concern left is to fit the object to the figure window, there's a lot of white space.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by