Changeset 24 for trunk/CrossPare/src/de/ugoe/cs
- Timestamp:
- 11/05/14 11:59:57 (10 years ago)
- Location:
- trunk/CrossPare/src/de/ugoe/cs/cpdp
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/CrossPare/src/de/ugoe/cs/cpdp/eval/AbstractWekaEvaluation.java
r6 r24 9 9 10 10 import de.ugoe.cs.cpdp.training.ITrainer; 11 import de.ugoe.cs.cpdp.training. WekaCompatibleTrainer;11 import de.ugoe.cs.cpdp.training.IWekaCompatibleTrainer; 12 12 import de.ugoe.cs.util.StringTools; 13 13 import weka.classifiers.Classifier; … … 71 71 final List<Classifier> classifiers = new LinkedList<Classifier>(); 72 72 for( ITrainer trainer : trainers ) { 73 if( trainer instanceof WekaCompatibleTrainer ) {74 classifiers.add((( WekaCompatibleTrainer) trainer).getClassifier());73 if( trainer instanceof IWekaCompatibleTrainer ) { 74 classifiers.add(((IWekaCompatibleTrainer) trainer).getClassifier()); 75 75 } else { 76 76 throw new RuntimeException("The selected evaluator only support Weka classifiers"); … … 81 81 output.append("version,size_test,size_training"); 82 82 for( ITrainer trainer : trainers ) { 83 output.append(",succHe_" + (( WekaCompatibleTrainer) trainer).getName());84 output.append(",succZi_" + (( WekaCompatibleTrainer) trainer).getName());85 output.append(",succG75_" + (( WekaCompatibleTrainer) trainer).getName());86 output.append(",succG60_" + (( WekaCompatibleTrainer) trainer).getName());87 output.append(",error_" + (( WekaCompatibleTrainer) trainer).getName());88 output.append(",recall_" + (( WekaCompatibleTrainer) trainer).getName());89 output.append(",precision_" + (( WekaCompatibleTrainer) trainer).getName());90 output.append(",fscore_" + (( WekaCompatibleTrainer) trainer).getName());91 output.append(",gscore_" + (( WekaCompatibleTrainer) trainer).getName());92 output.append(",mcc_" + (( WekaCompatibleTrainer) trainer).getName());93 output.append(",auc_" + (( WekaCompatibleTrainer) trainer).getName());94 output.append(",aucec_" + (( WekaCompatibleTrainer) trainer).getName());95 output.append(",tpr_" + (( WekaCompatibleTrainer) trainer).getName());96 output.append(",tnr_" + (( WekaCompatibleTrainer) trainer).getName());97 output.append(",tp_" + (( WekaCompatibleTrainer) trainer).getName());98 output.append(",fn_" + (( WekaCompatibleTrainer) trainer).getName());99 output.append(",tn_" + (( WekaCompatibleTrainer) trainer).getName());100 output.append(",fp_" + (( WekaCompatibleTrainer) trainer).getName());101 output.append(",trainerror_" + (( WekaCompatibleTrainer) trainer).getName());102 output.append(",trainrecall_" + (( WekaCompatibleTrainer) trainer).getName());103 output.append(",trainprecision_" + (( WekaCompatibleTrainer) trainer).getName());104 output.append(",trainsuccHe_" + (( WekaCompatibleTrainer) trainer).getName());83 output.append(",succHe_" + ((IWekaCompatibleTrainer) trainer).getName()); 84 output.append(",succZi_" + ((IWekaCompatibleTrainer) trainer).getName()); 85 output.append(",succG75_" + ((IWekaCompatibleTrainer) trainer).getName()); 86 output.append(",succG60_" + ((IWekaCompatibleTrainer) trainer).getName()); 87 output.append(",error_" + ((IWekaCompatibleTrainer) trainer).getName()); 88 output.append(",recall_" + ((IWekaCompatibleTrainer) trainer).getName()); 89 output.append(",precision_" + ((IWekaCompatibleTrainer) trainer).getName()); 90 output.append(",fscore_" + ((IWekaCompatibleTrainer) trainer).getName()); 91 output.append(",gscore_" + ((IWekaCompatibleTrainer) trainer).getName()); 92 output.append(",mcc_" + ((IWekaCompatibleTrainer) trainer).getName()); 93 output.append(",auc_" + ((IWekaCompatibleTrainer) trainer).getName()); 94 output.append(",aucec_" + ((IWekaCompatibleTrainer) trainer).getName()); 95 output.append(",tpr_" + ((IWekaCompatibleTrainer) trainer).getName()); 96 output.append(",tnr_" + ((IWekaCompatibleTrainer) trainer).getName()); 97 output.append(",tp_" + ((IWekaCompatibleTrainer) trainer).getName()); 98 output.append(",fn_" + ((IWekaCompatibleTrainer) trainer).getName()); 99 output.append(",tn_" + ((IWekaCompatibleTrainer) trainer).getName()); 100 output.append(",fp_" + ((IWekaCompatibleTrainer) trainer).getName()); 101 output.append(",trainerror_" + ((IWekaCompatibleTrainer) trainer).getName()); 102 output.append(",trainrecall_" + ((IWekaCompatibleTrainer) trainer).getName()); 103 output.append(",trainprecision_" + ((IWekaCompatibleTrainer) trainer).getName()); 104 output.append(",trainsuccHe_" + ((IWekaCompatibleTrainer) trainer).getName()); 105 105 } 106 106 output.append(StringTools.ENDLINE); -
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/IWekaCompatibleTrainer.java
r22 r24 3 3 import weka.classifiers.Classifier; 4 4 5 public interface WekaCompatibleTrainer extends ITrainer {5 public interface IWekaCompatibleTrainer extends ITrainer { 6 6 7 7 Classifier getClassifier(); -
trunk/CrossPare/src/de/ugoe/cs/cpdp/training/WekaBaseTraining.java
r23 r24 19 19 * Example: <trainer name="WekaClusterTraining2" param="RandomForestLocal weka.classifiers.trees.RandomForest -CVPARAM I 5 25 5"/> 20 20 */ 21 public abstract class WekaBaseTraining implements WekaCompatibleTrainer {21 public abstract class WekaBaseTraining implements IWekaCompatibleTrainer { 22 22 23 23 protected Classifier classifier = null;
Note: See TracChangeset
for help on using the changeset viewer.