Changeset 5 for trunk/CrossPare/src/de/ugoe/cs/cpdp/eval
- Timestamp:
- 08/05/14 11:42:12 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/eval/AbstractWekaEvaluation.java
r2 r5 95 95 output.append(",tn_" + ((WekaCompatibleTrainer) trainer).getName()); 96 96 output.append(",fp_" + ((WekaCompatibleTrainer) trainer).getName()); 97 output.append(",trainerror_" + ((WekaCompatibleTrainer) trainer).getName()); 98 output.append(",trainrecall_" + ((WekaCompatibleTrainer) trainer).getName()); 99 output.append(",trainprecision_" + ((WekaCompatibleTrainer) trainer).getName()); 100 output.append(",trainsuccHe_" + ((WekaCompatibleTrainer) trainer).getName()); 97 101 } 98 102 output.append(StringTools.ENDLINE); … … 104 108 105 109 Evaluation eval = null; 110 Evaluation evalTrain = null; 106 111 for( Classifier classifier : classifiers ) { 107 112 eval = createEvaluator(testdata, classifier); 113 evalTrain = createEvaluator(traindata, classifier); 108 114 109 115 double pf = eval.numFalsePositives(1)/(eval.numFalsePositives(1)+eval.numTrueNegatives(1)); … … 150 156 output.append("," + eval.numTrueNegatives(1)); 151 157 output.append("," + eval.numFalsePositives(1)); 158 output.append("," + evalTrain.errorRate()); 159 output.append("," + evalTrain.recall(1)); 160 output.append("," + evalTrain.precision(1)); 161 if( evalTrain.recall(1)>=0.7 && evalTrain.precision(1) >= 0.5 ) { 162 output.append(",1"); 163 } else { 164 output.append(",0"); 165 } 152 166 } 153 167
Note: See TracChangeset
for help on using the changeset viewer.