Package org.encog.ml.prg

Examples of org.encog.ml.prg.PrgCODEC


   
    final CalculateScore score = new TrainingSetScore(training);   
    TrainEA train = new TrainEA(pop, score);
    train.getRules().addRewriteRule(new RewriteConstants());
    train.getRules().addRewriteRule(new RewriteAlgebraic());
    train.setCODEC(new PrgCODEC());
    train.addOperation(0.8, new SubtreeCrossover());
    train.addOperation(0.1, new SubtreeMutation(pop.getContext(),4));
    train.addOperation(0.1, new ConstMutation(pop.getContext(),0.5,1.0));
    train.addScoreAdjuster(new ComplexityAdjustedScore());
    train.setSpeciation(new PrgSpeciation());
View Full Code Here


    PrgPopulation pop = new PrgPopulation(context,1);
    CalculateScore score = new ZeroEvalScoreFunction();

    TrainEA genetic = new TrainEA(pop, score);
    genetic.setValidationMode(true);
    genetic.setCODEC(new PrgCODEC());
    genetic.addOperation(0.95, new SubtreeCrossover());
    genetic.addOperation(0.05, new SubtreeMutation(context,4));
    genetic.addScoreAdjuster(new ComplexityAdjustedScore());
    genetic.getRules().addRewriteRule(new RewriteConstants());
    genetic.getRules().addRewriteRule(new RewriteAlgebraic());
View Full Code Here

TOP

Related Classes of org.encog.ml.prg.PrgCODEC

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.