code: function trainRandomForest(data, labels, options) {
      options = options || {};
      this.numTrees = options.numTrees || 100;
        
      // initialize many trees and train them all independently
      this.trees= new Array(this.numTrees);
      for(var i=0;i<this.numTrees;i++) {
          this.trees[i] = new DecisionTree();
          this.trees[i].train(data, labels, options);
      }
  }
docs: /*
  data is 2D array of size N x D of examples
  labels is a 1D array of labels (only -1 or 1 for now). In future will support multiclass or maybe even regression
  options.numTrees can be used to customize number of trees to train (default = 100)
  options.maxDepth is the maximum depth of each tree in the forest (default = 4)
  options.numTries is the number of random hypotheses generated at each node during training (default = 10)
  options.trainFun is a function with signature "function myWeakTrain(data, labels, ix, options)". Here, ix is a list of
  indexes into data of the instances that should be payed attention to. Everything not in the list
  should be ignored. This is done for efficiency. The function should return a model where you store
  variables. (i.e. model = {}; model.myvar = 5;) This will be passed to testFun.
  options.testFun is a function with signature "funtion myWeakTest(inst, model)" where inst is 1D array specifying an example,
  and model will be the same model that you return in options.trainFun. For example, model.myvar will be 5.
  see decisionStumpTrain() and decisionStumpTest() below for example.