public OnlineTrainer(IErrorCalculator errorCalculator, ILearningProvider dataProvider, LearningAlgorithm learningAlgorithm) { ErrorCalculator = errorCalculator; DataProvider = dataProvider; LearningAlgorithm = learningAlgorithm; tester = new NetworkTester(ErrorCalculator); }
/// <summary> /// Initializes a new instance of the <see cref="BackpropagationNetwork"/> class. /// </summary> /// <param name="errorCalculator">The error calculator.</param> public BackpropagationNetwork(IErrorCalculator errorCalculator) { // Initialize the class name that will appear in log files. this.name = ClassName + "_" + this.Id; const string MethodName = "ctor"; Logger.TraceIn(this.name, MethodName); this.errorCalculator = errorCalculator; this.inboundConnections = new List<ISupervisedLearnerConnection>(); this.outboundConnections = new List<ISupervisedLearnerConnection>(); this.inputNodes = new List<ISupervisedLearnerNode>(); this.outputNodes = new List<ISupervisedLearnerNode>(); Logger.TraceOut(this.name, MethodName); }
public NetworkTester(IErrorCalculator errorCalculator) { ErrorCalculator = errorCalculator; }
public void Initialize() { ErrorCalculator = new MeanSquareErrorCalculator(); }