示例#1
0
 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);
        }
示例#3
0
 public NetworkTester(IErrorCalculator errorCalculator)
 {
     ErrorCalculator = errorCalculator;
 }
示例#4
0
 public void Initialize()
 {
     ErrorCalculator = new MeanSquareErrorCalculator();
 }