Changeset 63
- Timestamp:
- 04/28/16 16:51:19 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/eval/AbstractWekaEvaluation.java
r44 r63 119 119 output.append(",tpr_" + ((IWekaCompatibleTrainer) trainer).getName()); 120 120 output.append(",tnr_" + ((IWekaCompatibleTrainer) trainer).getName()); 121 output.append(",fpr_" + ((IWekaCompatibleTrainer) trainer).getName()); 122 output.append(",fnr_" + ((IWekaCompatibleTrainer) trainer).getName()); 121 123 output.append(",tp_" + ((IWekaCompatibleTrainer) trainer).getName()); 122 124 output.append(",fn_" + ((IWekaCompatibleTrainer) trainer).getName()); 123 125 output.append(",tn_" + ((IWekaCompatibleTrainer) trainer).getName()); 124 126 output.append(",fp_" + ((IWekaCompatibleTrainer) trainer).getName()); 125 //output.append(",trainerror_" + ((IWekaCompatibleTrainer) trainer).getName());126 //output.append(",trainrecall_" + ((IWekaCompatibleTrainer) trainer).getName());127 //output.append(",trainprecision_" + ((IWekaCompatibleTrainer) trainer).getName());128 //output.append(",trainsuccHe_" + ((IWekaCompatibleTrainer) trainer).getName());129 127 } 130 128 output.append(StringTools.ENDLINE); … … 144 142 eval.numFalsePositives(1) / (eval.numFalsePositives(1) + eval.numTrueNegatives(1)); 145 143 double gmeasure = 2 * eval.recall(1) * (1.0 - pf) / (eval.recall(1) + (1.0 - pf)); 146 double mcc =147 (eval.numTruePositives(1) * eval.numTrueNegatives(1) - eval.numFalsePositives(1) *148 eval.numFalseNegatives(1)) /149 Math.sqrt((eval.numTruePositives(1) + eval.numFalsePositives(1)) *150 (eval.numTruePositives(1) + eval.numFalseNegatives(1)) *151 (eval.numTrueNegatives(1) + eval.numFalsePositives(1)) *152 (eval.numTrueNegatives(1) + eval.numFalseNegatives(1)));153 144 double aucec = calculateReviewEffort(testdata, classifier); 154 145 … … 186 177 output.append("," + eval.fMeasure(1)); 187 178 output.append("," + gmeasure); 188 output.append("," + mcc);179 output.append("," + eval.matthewsCorrelationCoefficient(1)); 189 180 output.append("," + eval.areaUnderROC(1)); 190 181 output.append("," + aucec); 191 182 output.append("," + eval.truePositiveRate(1)); 192 183 output.append("," + eval.trueNegativeRate(1)); 184 output.append("," + eval.falsePositiveRate(1)); 185 output.append("," + eval.falseNegativeRate(1)); 193 186 output.append("," + eval.numTruePositives(1)); 194 187 output.append("," + eval.numFalseNegatives(1)); 195 188 output.append("," + eval.numTrueNegatives(1)); 196 189 output.append("," + eval.numFalsePositives(1)); 197 /*output.append("," + evalTrain.errorRate());198 output.append("," + evalTrain.recall(1));199 output.append("," + evalTrain.precision(1));200 if (evalTrain.recall(1) >= 0.7 && evalTrain.precision(1) >= 0.5) {201 output.append(",1");202 }203 else {204 output.append(",0");205 }*/206 190 } 207 191
Note: See TracChangeset
for help on using the changeset viewer.