public class NodeIdCache
extends Object
| Constructor and Description |
|---|
NodeIdCache(RDD<int[]> nodeIdsForInstances,
scala.Option<String> checkpointDir,
int checkpointInterval) |
| Modifier and Type | Method and Description |
|---|---|
scala.Option<String> |
checkpointDir() |
int |
checkpointInterval() |
void |
deleteAllCheckpoints()
Call this after training is finished to delete any remaining checkpoints.
|
static NodeIdCache |
init(RDD<BaggedPoint<TreePoint>> data,
int numTrees,
scala.Option<String> checkpointDir,
int checkpointInterval,
int initVal)
Initialize the node Id cache with initial node Id values.
|
RDD<int[]> |
nodeIdsForInstances() |
void |
updateNodeIndices(RDD<BaggedPoint<TreePoint>> data,
scala.collection.mutable.Map<Object,NodeIndexUpdater>[] nodeIdUpdaters,
Bin[][] bins)
Update the node index values in the cache.
|
public NodeIdCache(RDD<int[]> nodeIdsForInstances, scala.Option<String> checkpointDir, int checkpointInterval)
public static NodeIdCache init(RDD<BaggedPoint<TreePoint>> data, int numTrees, scala.Option<String> checkpointDir, int checkpointInterval, int initVal)
data - The RDD of training rows.numTrees - The number of trees that we want to create cache for.checkpointDir - The checkpoint directory where the checkpointed files will be stored.checkpointInterval - The checkpointing interval
(how often should the cache be checkpointed.).initVal - The initial values in the cache.public RDD<int[]> nodeIdsForInstances()
public scala.Option<String> checkpointDir()
public int checkpointInterval()
public void updateNodeIndices(RDD<BaggedPoint<TreePoint>> data, scala.collection.mutable.Map<Object,NodeIndexUpdater>[] nodeIdUpdaters, Bin[][] bins)
data - The RDD of training rows.nodeIdUpdaters - A map of node index updaters.
The key is the indices of nodes that we want to update.bins - Bin information needed to find child node indices.public void deleteAllCheckpoints()