Skip to content

Commit f59ec66

Browse files
author
Maximilian Wenk
committed
fix confusion matrix
1 parent 5e6dbce commit f59ec66

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Iris_unordered_2.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,4 @@ Id,SepalLengthCm,SepalWidthCm,PetalLengthCm,PetalWidthCm,Species
148148
15,5.8,4.0,1.2,0.2,Iris-setosa
149149
33,5.2,4.1,1.5,0.1,Iris-setosa
150150
34,5.5,4.2,1.4,0.2,Iris-setosa
151-
16,5.7,4.4,1.5,0.4,Iris-virginica
151+
16,5.7,4.4,1.5,0.4,Iris-versicolor

src/classification/DATA_evaluation.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ protected void confusionMatrix() {
4646
this.confustionMatrix[this.sortedProbability[i][0]][this.sortedProbability[i][0]]++;
4747
}
4848
else {
49-
/*
50-
for (int j = 0; j < this.columnCount; j++) {
49+
50+
for (int j = 0; j < this.numberOfClasses; j++) {
5151
if (this.testDataResults[i].equals(this.predictedTestData[i][this.sortedProbability[i][j]][0])) {
5252
this.confustionMatrix[this.sortedProbability[i][0]][this.sortedProbability[i][j]]++;
5353
}
5454
}
5555

56-
*/
57-
this.confustionMatrix[this.sortedProbability[i][0]][1]++;
56+
57+
//this.confustionMatrix[this.sortedProbability[i][0]][1]++;
5858
}
5959

6060
}

0 commit comments

Comments
 (0)