Esempio n. 1
0
 private void btnTrain_Click(object sender, EventArgs e)
 {
     if (IsTrainingInProgress)
     {
         ConfirmExecutionInterruption();
     }
     else
     {
         ISupervisedTrainer trainer = new RandomForestTrainer(TreeCount, BandCountPerSplit, MaxTreeHeight, MinNodeSize,
                                                              BootstrappingRatio, IsParallel);
         TryTrainingAsync(trainer);
     }
 }
 /// <summary>
 /// Random forests are built on a bagged collection of features to try to capture the most salient points of the training data without overfitting
 /// </summary>
 /// <param name="data">The training data</param>
 /// <param name="b">The number of trees in the forest</param>
 /// <returns>A model that can be used for classification</returns>
 public static RandomForest TrainRandomForest(this IDataTable data, int b = 100)
 {
     return(RandomForestTrainer.Train(data, b));
 }