Example #1
0
 /// <summary>
 /// Starts the learning with specified learning rule in the current running
 /// thread to learn the specified training set, and returns from method when network is done learning 
 /// </summary>
 /// <param name="trainingSetToLearn">set of training elements to learn</param>
 /// <param name="learningRule">learning algorithm</param>
 public void LearnInSameThread(TrainingSet trainingSetToLearn, LearningRule learningRule)
 {
     LearningRule = learningRule;
     learningRule.TrainingSet = trainingSetToLearn;
     learningRule.SetStarted();
     learningRule.Run();
 }
Example #2
0
 /// <summary>
 /// Starts learning with specified learning rule in new thread to learn the
 /// specified training set, and immediately returns from method to the current thread execution 
 /// </summary>
 /// <param name="trainingSetToLearn">set of training elements to learn</param>
 /// <param name="learningRule">learning algorithm</param>
 public void LearnInNewThread(TrainingSet trainingSetToLearn, LearningRule learningRule)
 {
     LearningRule = learningRule;
     learningRule.TrainingSet = trainingSetToLearn;
     learningThread = new Thread(new ThreadStart(learningRule.Run));
     learningRule.SetStarted();
     learningThread.Start();
 }