Changeset 33340 for other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaAccuracyCalculator.java
- Timestamp:
- 2019-07-22T16:46:33+12:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaAccuracyCalculator.java
r33304 r33340 70 70 71 71 //Correctly identified SheetMusic as SheetMusic 72 73 //TruthAccuracyRate 72 74 if(sheetMusicCount != 0){ 73 75 trueAccuracyRate = ((float)truePositive/(float)sheetMusicCount)*(float)100; … … 77 79 } 78 80 81 //FalseAccuracyRate 79 82 if(notSheetMusicCount != 0){ 80 83 //Amount of Correctly identified NotSheetSheetMusic as NotSheetMusic … … 85 88 } 86 89 90 //Overall accuaracy 87 91 if(notSheetMusicCount != 0 && sheetMusicCount != 0) { 88 92 overallAccuracyRate = (truePositive + trueNegative)/(float)(sheetMusicCount+notSheetMusicCount)*(float)100; 89 93 } 90 else if (sheetMusicCount = 0) { 91 overallAccuracyRate = falseAccuracyRate/2; 94 else if (sheetMusicCount == 0) { 95 overallAccuracyRate = falseAccuracyRate; 96 } 97 else if(notSheetMusicCount == 0) { 98 overallAccuracyRate = trueAccuracyRate; 92 99 } 93 100 else { 94 overallAccuracyRate = trueAccuracyRate/2; 101 overallAccuracyRate = -1; 102 System.out.println("There is nothing to compare"); 95 103 } 96 104
Note:
See TracChangeset
for help on using the changeset viewer.