def grow
      @size.times do |i|
        Nimbus.write("\rCreating trees: #{i+1}/#{@size} ")
        tree_individuals_bag = individuals_random_sample
        tree_out_of_bag = oob tree_individuals_bag
        tree_class = (classification? ? ClassificationTree : RegressionTree)
        tree = tree_class.new @options.tree
        @trees << tree.seed(@options.training_set.individuals, tree_individuals_bag, @options.training_set.ids_fenotypes)
        @tree_errors << tree.generalization_error_from_oob(tree_out_of_bag)
        @tree_snp_importances << tree.estimate_importances(tree_out_of_bag) if @options.do_importances
        acumulate_predictions tree.predictions
        Nimbus.clear_line!
      end
      average_snp_importances if @options.do_importances
      totalize_predictions
    end
def grow
      @size.times do |i|
        Nimbus.write("\rCreating trees: #{i+1}/#{@size} ")
        tree_individuals_bag = individuals_random_sample
        tree_out_of_bag = oob tree_individuals_bag
        tree_class = (classification? ? ClassificationTree : RegressionTree)
        tree = tree_class.new @options.tree
        @trees << tree.seed(@options.training_set.individuals, tree_individuals_bag, @options.training_set.ids_fenotypes)
        @tree_errors << tree.generalization_error_from_oob(tree_out_of_bag)
        @tree_snp_importances << tree.estimate_importances(tree_out_of_bag) if @options.do_importances
        acumulate_predictions tree.predictions
        Nimbus.clear_line!
      end
      average_snp_importances if @options.do_importances
      totalize_predictions
    end
Initialize Forest object with options included in the Nimbus::Configuration object received.
 Creates a random forest based on the TrainingSet included in the configuration, creating N random trees (size N defined in the configuration).

 This is the method called when the application's configuration flags training on.

 It performs this tasks:

 * grow the forest (all the N random trees)
 * store generalization errors for every tree
 * obtain averaged importances for all the SNPs
 * calculate averaged predictions for all individuals in the training sample

 Every tree of the forest is created with a different random sample of the individuals in the training set.