public GeneticLearner(int populationSize, int selectionSize, IModelInitializer modelInitializer, IModelExecuter modelExecuter, IPopulationBreeder populationBreeder, ThreadSafeRandom random) { this.populationSize = populationSize; this.selectionSize = selectionSize; this.modelInitializer = modelInitializer; this.modelExecuter = modelExecuter; this.populationBreeder = populationBreeder; this.random = random; populationCostLocks = new object[populationSize].Select(o => new object()).ToArray(); population = new CostModel <FullyConnectedNeuralNetworkModel> [populationSize]; }
public void TestInitialize() { random = new ThreadSafeRandom(); modelInitializer = new FullyConnectedNeuralNetworkInitializer(random); sigmoidActivationFunction = new SigmoidActivationFunction(); modelExecuter = new FullyConnectedNeuralNetworkExecuter(sigmoidActivationFunction); modelBreeder = new GeneticModelBreeder(modelInitializer, random); populationBreeder = new PolygamousPopulationBreeder(modelBreeder, random); sut = new GeneticLearner(populationSize, selectionSize, modelInitializer, modelExecuter, populationBreeder, random); }
public CommandLineCommand(CommandLineParserOptions parserOptions, IServiceProvider serviceProvider, TOption option, IValidatorsContainer validators, ILogger logger, IModelInitializer modelInitializer, IArgumentManager argumentManager) { m_parserOptions = parserOptions ?? throw new ArgumentNullException(nameof(parserOptions)); m_commandOption = new TCommandOption(); m_validators = validators ?? throw new ArgumentNullException(nameof(validators)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.modelInitializer = modelInitializer ?? throw new ArgumentNullException(nameof(modelInitializer)); this.argumentManager = argumentManager ?? throw new ArgumentNullException(nameof(argumentManager)); m_serviceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider)); m_baseOption = option ?? throw new ArgumentNullException(nameof(option)); (m_helpOptionName, m_helpOptionNameLong) = parserOptions.GetConfiguredHelpOption(); InitialzeModel(); }
public Experiment( string title, int iterations, int batchSize, ActivationFunction activationFunction, int[] activationCountsPerLayer, IModelExecuter executer, ILearner learner, IModelInitializer modelInitializer, IDataSource dataSource) { Title = title; Iterations = iterations; this.batchSize = batchSize; this.activationFunction = activationFunction; this.activationCountsPerLayer = activationCountsPerLayer; this.executer = executer; this.learner = learner; this.modelInitializer = modelInitializer; this.dataSource = dataSource; random = new Random(); }
public GeneticModelBreeder(IModelInitializer modelInitializer, ThreadSafeRandom random) { this.modelInitializer = modelInitializer; this.random = random; }
public PersonAddRequestDetails(Point3D location, IEnumerable <IPropertyProvider> propertyProviders = null) : base(location) { _personInitializer = new PersonInitializer(this, propertyProviders); }
private void Init() { this._ModelInitializer = null;//fix this._ConfigurationPersistenceFacade = new ConfigurationPersistenceFacade(); }