code: public static <P> NearestNeighbor<P> kdRandomForest(  KdTreeDistance<P> distance ,
  														  int maxNodesSearched , int numTrees , int numConsiderSplit ,
  														  long randomSeed ) {
  
  		Random rand = new Random(randomSeed);
  
  		return new KdForestBbfSearch<>(numTrees,maxNodesSearched,distance,
  				new AxisSplitterMedian<>(distance,new AxisSplitRuleRandomK(rand,numConsiderSplit)));
  	}
docs: Approximate {@link NearestNeighbor} search which uses a set of randomly generated K-D trees and a Best-Bin-First
  search.  Designed to work in high dimensional space. Distance measure is Euclidean squared.
  
  @see KdForestBbfSearch
  @see AxisSplitterMedian
  
  @param distance Specifies how distance is computed between two points.
  @param maxNodesSearched  Maximum number of nodes it will search.  Controls speed and accuracy.
  @param numTrees Number of trees that are considered.  Try 10 and tune.
  @param numConsiderSplit Number of nodes that are considered when generating a tree.  Must be less than the
  point's dimension.  Try 5
  @param randomSeed Seed used by random number generator
  @param <P> Point type.
  @return {@link NearestNeighbor} implementation