File tree Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,10 @@ public static void main (String[] args) throws Exception {
99 // in the same project 
1010 boolean  index  = true ;
1111 boolean  header  = true ;
12-  String  dataset  = "Dry_Bean_Dataset.csv" ;
12+  String  dataset  = "Iris_unordered_2.csv" ;
13+  dataset  = "Dry_Bean_Dataset.csv" ;
14+ 
15+ 
1316
1417 ClassificationOfFloatValues  ob  = new  ClassificationOfFloatValues (dataset );
1518 ob .setIndex (true );
Original file line number Diff line number Diff line change @@ -94,7 +94,9 @@ public void evaluateResults() {
9494 this .predictedTestData ,
9595 this .sortedProbability ,
9696 this .numberOfClasses );
97-  int [][] asdf  = evaluationObject .getConfusionMatrixSimple ();
97+  System .out .println ("\n Simple Confusion Matrix" );
98+  evaluationObject .getConfusionMatrixSimple ();
99+  System .out .println ("\n Normalized Confusion Matrix" );
98100 evaluationObject .getConfusionMatrixNormalized ();
99101 }
100102 public  void  confusionMatrix () {
Original file line number Diff line number Diff line change @@ -50,14 +50,14 @@ private void confusionMatrix() {
5050 }
5151
5252
53- 
53+   /* 
5454 for (int i = 0; i < this.numberOfClasses; i++) { 
5555 for (int j = 0; j < this.numberOfClasses; j++) { 
5656 System.out.print(this.confustionMatrix[i][j] + " "); 
5757 } 
5858 System.out.println(); 
5959 } 
60- 
60+  */ 
6161
6262 }
6363
@@ -91,6 +91,7 @@ protected int[][] getConfusionMatrixSimple() {
9191 System .out .println ();
9292 }
9393
94+ 
9495 return  confusionMatrixSimple ;
9596 }
9697 protected  float [][] getConfusionMatrixNormalized () {
Original file line number Diff line number Diff line change @@ -177,8 +177,8 @@ private void testClassificationModel() {
177177 tempDelta [j ][this .rowCount  -1 ] = (float ) Math .sqrt (tempCalcDistance );
178178 this .predictedTestData [i ][j ][1 ] = Float .toString (tempDelta [j ][this .rowCount  -1 ]);
179179
180-  System .out .print (" "  + this .predictedTestData [i ][j ][0 ] + " " );
181-  System .out .println (this .predictedTestData [i ][j ][1 ]);
180+  // System.out.print(" " + this.predictedTestData[i][j][0] + " ");
181+  // System.out.println(this.predictedTestData[i][j][1]);
182182
183183
184184
                         You can’t perform that action at this time. 
           
                  
0 commit comments