?? confmat.cpp
字號:
/*************************************************************************/
/* */
/* Routine for printing confusion matrices */
/* --------------------------------------- */
/* */
/*************************************************************************/
#include "defns.h"
#include "c45types.h"
#include "extern.h"
extern FILE *fpScreen;
void PrintConfusionMatrix(ItemNo * ConfusionMat)
/* -------------------- */
{
int Row, Col;
/* Print the heading, then each row */
fprintf(fpScreen,"\n\n\t");
printf("\n\n\t");
ForEach(Col, 0, MaxClass)
{
fprintf(fpScreen," (%c)", 'a' + Col);
printf(" (%c)", 'a' + Col);
}
fprintf(fpScreen,"\t<-classified as\n\t");
printf("\t<-classified as\n\t");
ForEach(Col, 0, MaxClass)
{
fprintf(fpScreen," ----");
printf(" ----");
}
fprintf(fpScreen,"\n");
printf("\n");
ForEach(Row, 0, MaxClass)
{
fprintf(fpScreen,"\t");
printf("\t");
ForEach(Col, 0, MaxClass)
{
if ( ConfusionMat[Row*(MaxClass+1) + Col] )
{
fprintf(fpScreen,"%5d", ConfusionMat[Row*(MaxClass+1) + Col]);
printf("%5d", ConfusionMat[Row*(MaxClass+1) + Col]);
}
else
{
fprintf(fpScreen," ");
printf(" ");
}
}
fprintf(fpScreen,"\t(%c): class %s\n", 'a' + Row, ClassName[Row]);
printf("\t(%c): class %s\n", 'a' + Row, ClassName[Row]);
}
fprintf(fpScreen,"\n");
printf("\n");
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -