/// <summary> /// Adds a single training example /// </summary> private void AddTrainingExamplePrivate() { // Declare new example to add to vector IMLTrainingExample newExample = new IMLTrainingExample(); // Add all the input features to the training example being recorded for (int i = 0; i < InputFeatures.Count; i++) { newExample.AddInputExample((InputFeatures[i] as IFeatureIML).FeatureValues); } // Add all the output features to the training example being recorded for (int i = 0; i < m_DesiredOutputFeatures.Count; i++) { newExample.AddOutputExample(m_DesiredOutputFeatures[i]); } // Add the training example to the vector TrainingExamplesVector.Add(newExample); }
/// <summary> /// Adds a single training example /// </summary> protected void AddTrainingExampleprotected() { // Declare new example to add to vector IMLTrainingExample newExample = new IMLTrainingExample(); // Add all the input features to the training example being recorded for (int i = 0; i < InputFeatures.Count; i++) { newExample.AddInputExample((InputFeatures[i] as IFeatureIML).FeatureValues); } // Add all the output features to the training example being recorded for (int i = 0; i < TargetValues.Count; i++) { newExample.AddOutputExample((TargetValues[i] as IFeatureIML).FeatureValues); } // Add the training example to the vector TrainingExamplesVector.Add(newExample); SaveDataToDisk(); }