Matlab code for drawing and calculating result Accuracy
% Matrix abscissa featuredimension, Y coordinate n_corpus
Featuredimension = [ 10 , 20 , 30 , 40 , 50 , 60 , 70 , 80 , 90 , 100 , 110 , 120 , 130 , 140 , 150 ];
N_corpus = [ 100 , 500 , 1000 , 1500 , 2000 , 2500 , 3000 ];
Matrix0 = Load ( ' 0. txt ' );
Matrix1 = Load ( ' 1. txt ' );
Matrix2 = Load ( ' 2. txt ' );
Matrix3 = Load ( ' 3. txt ' );
Matrix4 = Load ( ' 4. txt ' );
Avamatrix = (Matrix0 + Matrix1 + Matrix2 + Matrix3 + Matrix4) / 5
SaveFile = ' Avaaccuracy.txt ' ;
Save avaaccuracy.txt avamatrix - ASCII
[Y, I] = Max (avamatrix ' )
Figure ( 1 )
Set ( 1 , ' Position ' ,[ 10 , 50 , 500 , 500 ]);
Plot (featuredimension, avamatrix ( 1 ,:), ' -Bo ' )
Hold on
Plot (featuredimension, avamatrix ( 2 ,:), ' -G * ' )
Hold on
Plot (featuredimension, avamatrix ( 3 ,:), ' -Rs ' )
Hold on
Plot (featuredimension, avamatrix ( 4 ,:), ' -CV ' )
Axis ([ 10 , 150 , 60 , 105 ])
Text ( 30 , 100 , ' (Note: "blue" represents corpussize = 200 "green" reprensents corpussize = 1000, "Red" represents corpussize = 2000, "cyan represents corpussize = 3000 ") ' )
Title ( ' Influence of feature dimension on classification accuracy ' )
Xlabel ( ' Feature dimension ' )
Ylabel ( ' Accuracy ' )
Hold off