public static void build ( final Key jobKey , final Key modelKey , final DRFParams drfParams , final Data localData , int ntrees , int numSplitFeatures , int [ ] rowsPerChunks ) { Timer t_alltrees = new Timer ( ) ; Tree [ ] trees = new Tree [ ntrees ] ; Log . info ( Log . Tag . Sys . RANDF , "Building " + ntrees + " trees" ) ; Log . info ( Log . Tag . Sys . RANDF , "Number of split features: " + numSplitFeatures ) ; Log . info ( Log . Tag . Sys . RANDF , "Starting RF computation with " + localData . rows ( ) + " rows " ) ; Random rnd = Utils . getRNG ( localData . seed ( ) + ROOT_SEED_ADD ) ; Sampling sampler = createSampler ( drfParams , rowsPerChunks ) ; byte producerId = ( byte ) H2O . SELF . index ( ) ; for ( int i = 0 ; i < ntrees ; ++ i ) { long treeSeed = rnd . nextLong ( ) + TREE_SEED_INIT ; // make sure that enough bits is initialized trees [ i ] = new Tree ( jobKey , modelKey , localData , producerId , drfParams . max_depth , drfParams . stat_type , numSplitFeatures , treeSeed , i , drfParams . _exclusiveSplitLimit , sampler , drfParams . _verbose , drfParams . regression , ! drfParams . _useNonLocalData , ( ( SpeeDRFModel ) UKV . get ( modelKey ) ) . score_pojo ) ; } Log . info ( "Invoking the tree build tasks on all nodes." ) ; DRemoteTask . invokeAll ( trees ) ; Log . info ( Log . Tag . Sys . RANDF , "All trees (" + ntrees + ") done in " + t_alltrees ) ; }
Build random forest for data stored on this node .