Package com.heatonresearch.aifh.learning.score

Examples of com.heatonresearch.aifh.learning.score.ScoreFunction


        Population pop = new BasicPopulation();
        pop.setGenomeFactory(new IntegerArrayGenomeFactory(5));

        // Create a trainer with a very simple score function.  We do not care
        // about the calculation of the score, as they will never be calculated.
        EvolutionaryAlgorithm train = new BasicEA(pop, new ScoreFunction() {
            @Override
            public double calculateScore(MLMethod method) {
                return 0;
            }
View Full Code Here


        Population pop = new BasicPopulation();
        pop.setGenomeFactory(new DoubleArrayGenomeFactory(5));

        // Create a trainer with a very simple score function.  We do not care
        // about the calculation of the score, as they will never be calculated.
        EvolutionaryAlgorithm train = new BasicEA(pop, new ScoreFunction() {
            @Override
            public double calculateScore(MLMethod method) {
                return 0;
            }
View Full Code Here

        initCities();

        Population pop = initPopulation();

        ScoreFunction score = new TSPScore(cities);

        genetic = new BasicEA(pop, score);

        genetic.addOperation(0.9, new SpliceNoRepeat(CITIES / 3));
        genetic.addOperation(0.1, new MutateShuffle());
View Full Code Here

            final List<BasicData> trainingData = ds.extractSupervised(0,
                    codec.getInputCount(), codec.getRbfCount(), codec.getOutputCount());

            Population pop = initPopulation(rnd, codec);

            ScoreFunction score = new ScoreRegressionData(trainingData);

            BasicEA genetic = new BasicEA(pop, score);
            genetic.setSpeciation(new ArraySpeciation<DoubleArrayGenome>());
            genetic.setCODEC(codec);
            genetic.addOperation(0.7, new Splice(codec.size() / 5));
View Full Code Here

            final List<BasicData> trainingData = ds.extractSupervised(0,
                    codec.getInputCount(), 4, codec.getOutputCount());

            Population pop = initPopulation(rnd, codec);

            ScoreFunction score = new ScoreRegressionData(trainingData);

            BasicEA genetic = new BasicEA(pop, score);
            genetic.setCODEC(codec);
            genetic.addOperation(0.7, new Splice(codec.size() / 3));
            genetic.addOperation(0.3, new MutatePerturb(0.1));
View Full Code Here


        GenerateRandom rnd = new MersenneTwisterGenerateRandom();
        EvaluateExpression eval = new EvaluateExpression(rnd);
        Population pop = initPopulation(rnd, eval);
        ScoreFunction score = new ScoreSmallExpression(training,30);

        EvolutionaryAlgorithm genetic = new BasicEA(pop, score);
        genetic.addOperation(0.3, new MutateTree(3));
        genetic.addOperation(0.7, new CrossoverTree());
        genetic.setShouldIgnoreExceptions(false);
View Full Code Here

            final List<BasicData> trainingData = ds.extractSupervised(0, 4, 4, 2);

            final RBFNetwork network = new RBFNetwork(4, 4, 2);
            network.reset(new MersenneTwisterGenerateRandom());
            final ScoreFunction score = new ScoreRegressionData(trainingData);
            final TrainNelderMead train = new TrainNelderMead(network, score);
            performIterations(train, 1000, 0.01, true);
            queryEquilateral(network, trainingData, species, 0, 1);

View Full Code Here

     * Run the example.
     */
    public void process() {
        final List<BasicData> trainingData = generateTrainingData();
        final PolynomialFn poly = new PolynomialFn(3);
        final ScoreFunction score = new ScoreRegressionData(trainingData);
        final TrainGreedyRandom train = new TrainGreedyRandom(true, poly, score);
        performIterations(train, 1000000, 0.01, true);
        System.out.println(poly.toString());
    }
View Full Code Here

            final List<BasicData> trainingData = ds.extractSupervised(0, 4, 4, 2);

            final RBFNetwork network = new RBFNetwork(4, 4, 2);
            network.reset(new MersenneTwisterGenerateRandom());
            final ScoreFunction score = new ScoreRegressionData(trainingData);
            final TrainHillClimb train = new TrainHillClimb(true, network, score);
            performIterations(train, 100000, 0.01, true);
            queryEquilateral(network, trainingData, species, 0, 1);

View Full Code Here

     * Perform the example.
     */
    public void process() {
        final List<BasicData> trainingData = BasicData.convertArrays(XOR_INPUT, XOR_IDEAL);
        final RBFNetwork network = new RBFNetwork(2, 5, 1);
        final ScoreFunction score = new ScoreRegressionData(trainingData);
        final TrainGreedyRandom train = new TrainGreedyRandom(true, network, score);
        performIterations(train, 1000000, 0.01, true);
        query(network, trainingData);
    }
View Full Code Here

TOP

Related Classes of com.heatonresearch.aifh.learning.score.ScoreFunction

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.