Package zdenekdrahos.AI.Training.Builder

Source Code of zdenekdrahos.AI.Training.Builder.TrainingBuilder

/*
* JAVA Neural Networks (https://bitbucket.org/zdenekdrahos/java-neural-networks)
* @license New BSD License
* @author Zdenek Drahos
*/

package zdenekdrahos.AI.Training.Builder;

import zdenekdrahos.AI.BackPropagation.BackPropagation;
import zdenekdrahos.AI.FeedForward.FeedForward;
import zdenekdrahos.AI.Training.Simulation.Simulation;
import zdenekdrahos.AI.Training.ITraining;
import zdenekdrahos.AI.Training.Sets.DataSeparator;
import zdenekdrahos.AI.Training.Training;
import zdenekdrahos.AI.Training.TrainingSettings;
import zdenekdrahos.Statistics.Characteristics.Mean;
import zdenekdrahos.Statistics.Errors.LeastSquares;

public class TrainingBuilder implements ITrainingBuilder {

    private TrainingSettings settings;

    public TrainingBuilder() {
        loadDefaultSettings();
    }

    @Override
    public void setSettings(TrainingSettings setttings) {
        this.settings = setttings;
    }

    @Override
    public ITraining build() {
        return new Training(settings);
    }

    private void loadDefaultSettings() {
        settings = new TrainingSettings();
        settings.separator = new DataSeparator();
        settings.feedForward = new FeedForward();
        settings.backPropagation = new BackPropagation();
        settings.simulation = new Simulation();
        settings.errorCalculator = new LeastSquares();
        settings.meanCalculator = new Mean();
    }
}
TOP

Related Classes of zdenekdrahos.AI.Training.Builder.TrainingBuilder

TOP
Copyright © 2018 www.massapi.com. 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.