Changeset 131


Ignore:
Timestamp:
06/28/16 11:06:26 (8 years ago)
Author:
sherbold
Message:
  • added workaround to WekaBaseTraining? to allow setting that no ADTree is used for BayesNet? when using a Vote classifier (required due to bug in WEKAs option parser
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrossPare/src/de/ugoe/cs/cpdp/training/WekaBaseTraining.java

    r86 r131  
    2222import weka.core.OptionHandler; 
    2323import weka.classifiers.Classifier; 
     24import weka.classifiers.bayes.BayesNet; 
    2425import weka.classifiers.meta.CVParameterSelection; 
     26import weka.classifiers.meta.Vote; 
    2527 
    2628/** 
     
    9395            cl = obj; 
    9496 
     97            if( cl instanceof Vote ) { 
     98                Vote votingClassifier = (Vote) cl; 
     99                for( Classifier classifier : votingClassifier.getClassifiers() ) { 
     100                    if( classifier instanceof BayesNet ) { 
     101                        ((BayesNet) classifier).setUseADTree(false); 
     102                    } 
     103                } 
     104            } 
    95105            // we have cross val params 
    96106            // cant check on cvparam.length here, it may not be initialized 
Note: See TracChangeset for help on using the changeset viewer.