code: public void fit(INDArray x) {
          this.data = x;
          for(int i = 0; i < numTrees; i++) {
              RPTree tree = new RPTree(data.columns(),maxSize,similarityFunction);
              tree.buildTree(x);
              trees.add(tree);
          }
      }
docs: Build the trees from the given dataset
  @param x the input dataset (should be a 2d matrix)