Package org.uncommons.watchmaker.framework.selection

Examples of org.uncommons.watchmaker.framework.selection.RouletteWheelSelection


    DatasetSplit split = new DatasetSplit(0.75);
   
    // Fitness Evaluator (defaults to training)
    FitnessEvaluator<? super CDRule> evaluator = new CDFitnessEvaluator(dataset, target, split);
    // Selection Strategy
    SelectionStrategy<? super CDRule> selection = new RouletteWheelSelection();
   
    EvolutionEngine<CDRule> engine = new SequentialEvolutionEngine<CDRule>(factory, pipeline, evaluator,
        selection, RandomUtils.getRandom());
   
    engine.addEvolutionObserver(new EvolutionObserver<CDRule>() {
View Full Code Here


      innerPanel.add(generationsSpinner);
     
      selectionLabel = new JLabel("Selection Strategy: ");
      innerPanel.add(selectionLabel);
     
      SelectionStrategy<?>[] selectionStrategies = {new RankSelection(), new RouletteWheelSelection(),
                                                    new StochasticUniversalSampling(),
                                                    new TournamentSelection(new Probability(0.95)),
                                                    new TruncationSelection(0.5)};
     
      selectionCombo = new JComboBox(selectionStrategies);
View Full Code Here

    DatasetSplit split = new DatasetSplit(0.75);

    // Fitness Evaluator (defaults to training)
    FitnessEvaluator<? super CDRule> evaluator = new CDFitnessEvaluator(dataset, target, split);
    // Selection Strategy
    SelectionStrategy<? super CDRule> selection = new RouletteWheelSelection();

    EvolutionEngine<CDRule> engine =
        new SequentialEvolutionEngine<CDRule>(factory, pipeline, evaluator, selection, RandomUtils.getRandom());

    engine.addEvolutionObserver(new EvolutionObserver<CDRule>() {
View Full Code Here

      innerPanel.add(generationsSpinner);
     
      selectionLabel = new JLabel("Selection Strategy: ");
      innerPanel.add(selectionLabel);
     
      SelectionStrategy<?>[] selectionStrategies = {new RankSelection(), new RouletteWheelSelection(),
                                                    new StochasticUniversalSampling(),
                                                    new TournamentSelection(new Probability(0.95)),
                                                    new TruncationSelection(0.5)};
     
      selectionCombo = new JComboBox(selectionStrategies);
View Full Code Here

    DatasetSplit split = new DatasetSplit(0.75);

    // Fitness Evaluator (defaults to training)
    FitnessEvaluator<? super CDRule> evaluator = new CDFitnessEvaluator(dataset, target, split);
    // Selection Strategy
    SelectionStrategy<? super CDRule> selection = new RouletteWheelSelection();

    EvolutionEngine<CDRule> engine =
        new SequentialEvolutionEngine<CDRule>(factory, pipeline, evaluator, selection, RandomUtils.getRandom());

    engine.addEvolutionObserver(new EvolutionObserver<CDRule>() {
View Full Code Here

    // Fitness Evaluator (defaults to training)
    FitnessEvaluator<? super CDRule> evaluator = new CDFitnessEvaluator(
        dataset, target, split);
    // Selection Strategy
    SelectionStrategy<? super CDRule> selection = new RouletteWheelSelection();

    EvolutionEngine<CDRule> engine = new SequentialEvolutionEngine<CDRule>(factory,
        pipeline, evaluator, selection, new MersenneTwisterRNG());

    engine.addEvolutionObserver(new EvolutionObserver<CDRule>() {
View Full Code Here

      selectionLabel = new JLabel("Selection Strategy: ");
      innerPanel.add(selectionLabel);

      SelectionStrategy<?>[] selectionStrategies = {
          new RankSelection(), new RouletteWheelSelection(),
          new StochasticUniversalSampling(), new TournamentSelection(new Probability(0.95d)),
          new TruncationSelection(0.5d)};

      selectionCombo = new JComboBox(selectionStrategies);
      selectionCombo.setRenderer(new DefaultListCellRenderer() {
View Full Code Here

    // Fitness Evaluator (defaults to training)
    FitnessEvaluator<? super CDRule> evaluator = new CDFitnessEvaluator(
        dataset, target, split);
    // Selection Strategy
    SelectionStrategy<? super CDRule> selection = new RouletteWheelSelection();

    EvolutionEngine<CDRule> engine = new SequentialEvolutionEngine<CDRule>(factory,
        pipeline, evaluator, selection, RandomUtils.getRandom());

    engine.addEvolutionObserver(new EvolutionObserver<CDRule>() {
View Full Code Here

      selectionLabel = new JLabel("Selection Strategy: ");
      innerPanel.add(selectionLabel);

      SelectionStrategy<?>[] selectionStrategies = {
          new RankSelection(), new RouletteWheelSelection(),
          new StochasticUniversalSampling(), new TournamentSelection(new Probability(0.95)),
          new TruncationSelection(0.5)};

      selectionCombo = new JComboBox(selectionStrategies);
      selectionCombo.setRenderer(new DefaultListCellRenderer() {
View Full Code Here

        operators.add(new StringCrossover());
        EvolutionaryOperator<String> pipeline = new EvolutionPipeline<String>(operators);
        EvolutionEngine<String> engine = new GenerationalEvolutionEngine<String>(factory,
                                                                                 pipeline,
                                                                                 new StringEvaluator(target),
                                                                                 new RouletteWheelSelection(),
                                                                                 new MersenneTwisterRNG());
        engine.addEvolutionObserver(new EvolutionLogger());
        return engine.evolve(100, // 100 individuals in the population.
                             5, // 5% elitism.
                             new TargetFitness(0, false));
View Full Code Here

TOP

Related Classes of org.uncommons.watchmaker.framework.selection.RouletteWheelSelection

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.