Package com.heatonresearch.aifh.learning

Examples of com.heatonresearch.aifh.learning.RBFNetworkGenomeCODEC


            ds.normalizeRange(2, -1, 1);
            ds.normalizeRange(3, -1, 1);
            final Map<String, Integer> species = ds.encodeOneOfN(4);
            istream.close();

            final RBFNetworkGenomeCODEC codec = new RBFNetworkGenomeCODEC(4, 4, 3);

            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));
            genetic.addOperation(0.3, new MutatePerturb(0.1));


            performIterations(genetic, 100000, 0.05, true);

            RBFNetwork winner = (RBFNetwork) codec.decode(genetic.getBestGenome());

            queryOneOfN(winner, trainingData, species);


        } catch (Throwable t) {
View Full Code Here


            ds.normalizeRange(2, -1, 1);
            ds.normalizeRange(3, -1, 1);
            final Map<String, Integer> species = ds.encodeOneOfN(4);
            istream.close();

            final RBFNetworkGenomeCODEC codec = new RBFNetworkGenomeCODEC(4, RBF_COUNT, 3);

            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));


            performIterations(genetic, 100000, 0.05, true);

            RBFNetwork winner = (RBFNetwork) codec.decode(genetic.getBestGenome());

            queryOneOfN(winner, trainingData, species);


        } catch (Throwable t) {
View Full Code Here

TOP

Related Classes of com.heatonresearch.aifh.learning.RBFNetworkGenomeCODEC

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.