File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
out/production/classification/classification Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -173,17 +173,23 @@ private void testClassificationModel() {
173173 }
174174 float min = Float .valueOf (this .predictedTestData [i ][0 ][1 ]);
175175 int tempIndex = 0 ;
176+ this .sortedProbability [i ][0 ] = tempIndex ;
176177 for (int j = 0 ; j <this .numberOfClasses ; j ++) {
177178 if (min > Float .valueOf (this .predictedTestData [i ][j ][1 ])) {
178179 min = Float .valueOf (this .predictedTestData [i ][j ][1 ]);
179180 tempIndex = j ;
180-
181+ if (this .sortedProbability [i ][0 ] != 0 ) {
182+ for (int k = this .numberOfClasses -1 ; k > 0 ; k --) {
183+ this .sortedProbability [i ][k ] = this .sortedProbability [i ][k -1 ];
184+ }
185+ }
186+ this .sortedProbability [i ][0 ] = j ;
181187 }
182-
183-
184188 }
185189 this .sortedProbability [i ][0 ] = tempIndex ;
186190 System .out .println (this .sortedProbability [i ][0 ]);
191+ System .out .println (this .sortedProbability [i ][1 ]);
192+ System .out .println (this .sortedProbability [i ][2 ]);
187193
188194
189195 if (i == 5 ) {
You can’t perform that action at this time.
0 commit comments