Ignore:
Timestamp:
11/17/15 20:42:08 (9 years ago)
Author:
atrautsch
Message:

metric matching hinzu

File:
1 edited

Legend:

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

    r41 r44  
    1 // Copyright 2015 Georg-August-Universität Göttingen, Germany 
     1// Copyright 2015 Georg-August-Universit�t G�ttingen, Germany 
    22// 
    33//   Licensed under the Apache License, Version 2.0 (the "License"); 
     
    4040import de.ugoe.cs.cpdp.eval.IEvaluationStrategy; 
    4141import de.ugoe.cs.cpdp.loader.IVersionLoader; 
     42import de.ugoe.cs.cpdp.training.ISetWiseTestdataAwareTrainingStrategy; 
    4243import de.ugoe.cs.cpdp.training.ISetWiseTrainingStrategy; 
    4344import de.ugoe.cs.cpdp.training.ITrainingStrategy; 
     
    114115 
    115116    /** 
     117     * setwise testdata aware trainers, i.e., trainers that require the selected training data to be separate from 
     118     * each other and the current testdata  
     119     */ 
     120    private List<ISetWiseTestdataAwareTrainingStrategy> setwiseTestdataAwareTrainers; 
     121     
     122    /** 
    116123     * data processors that are applied before the pointwise data selection 
    117124     */ 
     
    178185        setwisepostprocessors = new LinkedList<>(); 
    179186        setwiseTrainers = new LinkedList<>(); 
     187        setwiseTestdataAwareTrainers = new LinkedList<>(); 
    180188        preprocessors = new LinkedList<>(); 
    181189        pointwiseselectors = new LinkedList<>(); 
     
    324332    } 
    325333 
     334    /** 
     335     * returns the setwise training algorithms 
     336     *  
     337     * @return setwise training algorithms 
     338     */ 
     339    public List<ISetWiseTestdataAwareTrainingStrategy> getSetWiseTestdataAwareTrainers() { 
     340        return setwiseTestdataAwareTrainers; 
     341    } 
     342     
    326343    /** 
    327344     * returns the processors applied before the pointwise data selection 
     
    465482                trainer.setParameter(attributes.getValue("param")); 
    466483                setwiseTrainers.add(trainer); 
     484            } 
     485            else if (qName.equals("setwisetestdataawaretrainer")) { 
     486                final ISetWiseTestdataAwareTrainingStrategy trainer = 
     487                    (ISetWiseTestdataAwareTrainingStrategy) Class.forName("de.ugoe.cs.cpdp.training." + 
     488                                                                 attributes.getValue("name")) 
     489                        .newInstance(); 
     490                trainer.setParameter(attributes.getValue("param")); 
     491                setwiseTestdataAwareTrainers.add(trainer); 
    467492            } 
    468493            else if (qName.equals("preprocessor")) { 
     
    566591        setwisepostprocessors.addAll(other.setwisepostprocessors); 
    567592        setwiseTrainers.addAll(other.setwiseTrainers); 
     593        setwiseTestdataAwareTrainers.addAll(other.setwiseTestdataAwareTrainers); 
    568594        preprocessors.addAll(other.preprocessors); 
    569595        pointwiseselectors.addAll(other.pointwiseselectors); 
     
    609635            StringTools.ENDLINE); 
    610636        builder.append("Setwise trainers: " + setwiseTrainers.toString() + StringTools.ENDLINE); 
     637        builder.append("Setwise Testdata Aware trainers: " + setwiseTestdataAwareTrainers.toString() + StringTools.ENDLINE); 
    611638        builder 
    612639            .append("Pointwise preprocessors: " + preprocessors.toString() + StringTools.ENDLINE); 
Note: See TracChangeset for help on using the changeset viewer.