public class RandomForestModel extends Object
Modifier and Type | Method and Description |
---|---|
int |
get_pruningCount()
Returns the value representing the number of terminal nodes to which each tree in the
original model should be pruned back.
|
int |
get_rfCores()
Returns the number of cores to be used by the algorithm when OpenMP
parallel processing is in force.
|
int |
get_seed()
Returns the seed for the random number generator used by the
algorithm.
|
int |
get_trace()
Returns the trace parameter indicating the specified update interval in seconds.
|
String[] |
get_xImportance()
Returns the x-variable(s) over which importance calculations should
be conducted.
|
String[] |
get_yTarget()
Returns the array of y-variable to be targeted when multivariate
families are in force.
|
Object |
getEnsemble(String name) |
String |
getEnsembleArg(String key)
Returns the current value for the specified ensemble argument.
|
ModelArg |
getModelArg()
Returns the class containing the model arguments that produced the
RandomForestModel object. |
com.kogalur.randomforest.ModelType |
getModelType() |
void |
printEnsemble(Object ensb) |
void |
printEnsembleList() |
void |
set_pruningCount(int pruningCount)
Sets the number of terminal nodes to which each tree in the
original model should be pruned back.
|
void |
set_rfCores(int rfCores)
Sets the number of cores to be used by the algorithm when OpenMP
parallel processing is in force.
|
void |
set_seed(int seed)
Sets the seed for the random number generator used by the
algorithm.
|
void |
set_trace(int trace)
Sets the trace parameter indicating the specified update
interval in seconds.
|
void |
set_xImportance()
Sets the x-variable(s), over which importance calculations should
be conducted, to all x-variables.
|
void |
set_xImportance(String[] xImportance)
Sets the x-variable(s) over which importance calculations should
be conducted.
|
void |
set_yTarget()
Sets the default action for the y-variable(s) to be targeted when multivariate
families are in force.
|
void |
set_yTarget(String[] yTarget)
Sets the y-variable(s) to be targeted when multivariate
families are in force.
|
void |
setEnsembleArg()
Sets default values for the ensemble outputs resulting from restoring the model or using it to predict with new data.
|
void |
setEnsembleArg(String key,
String value)
Sets the ensemble outputs desired when restoring the model or
using it to predict with new data.
|
public ModelArg getModelArg()
RandomForestModel
object.RandomForestModel
object.public void setEnsembleArg(String key, String value)
ModelArg.setEnsembleArg(String, String)
,
but are context sensitive to restoration versus
prediction. These settings are in the form of <key, value>
pairs, where the key is the name of the ensemble, and
the value is the specific option for that ensemble.
The default option for each key is in bold.
Ensemble Key
Possible Values
weight
no, inbag, oob, all
proximity
no, inbag, oob, all
membership
no, yes
importance
no, permute, random, anti,
permute.joint, random.joint, anti.joint
permute.ensemble, random.ensemble, anti.ensemble,
permute.joint.ensemble, random.joint.ensemble, anti.joint.ensemble
varUsed
no, every.tree, sum.tree
splitDepth
no, every.tree, sum.tree
errorType
For RF-C, RF-C+ Families Only:
default, brier, g.mean, g.mean.drc
Note that the options inbag, oob
are only relevant when restoring a model, and all
is the only
relevant option when predicting with new data. Invalid values will be overridden.key
- The name of the ensemble output.value
- The specific value for the ensemble output.public void setEnsembleArg()
setEnsembleArg(String, String).
public String getEnsembleArg(String key)
key
- The name of the ensemble output.setEnsembleArg(String, String).
public void set_pruningCount(int pruningCount)
pstnMembership
.pruningCount
- The number of terminal nodes to which each tree in the
original model should be pruned back. The default action is to conduct no pruning, and is explicitly
achieved by setting this parameter to zero (0).public int get_pruningCount()
set_pruningCount(int)
public void set_yTarget(String[] yTarget)
yTarget
- Array of y-variables to be targeted when
multivariate families are in force. The default action is to
use all y-variables.public void set_yTarget()
set_yTarget(String[])
public String[] get_yTarget()
set_yTarget(String[])
public void set_xImportance(String[] xImportance)
xSize
is large and importance
over a small subset of x-variables is desired. In addition, if a joint importance calculation is
desired, the specified x-variables are jointly targeted in the calculations.xImportance
- Array of x-variables over which important calculations should be conducted.
The default action is to not provide importance ensembles. This can be
alse be accomplished by sending a null value into the method.public void set_xImportance()
xSize
is large, as computation times can be lengthy.set_xImportance(String[])
public String[] get_xImportance()
set_xImportance(String[])
public void set_seed(int seed)
get_seed()
.public int get_seed()
set_seed(int)
public void set_trace(int trace)
trace
- The trace parameter indicating the specified update
interval in seconds. During extended execution times,
the approximate time to complete the execution is output to a
trace file in the users HOME directory. The format and
location of the trace file can be controlled by modifying
src/main/resources/spark/log.properties
. A value
of zero (0) turns off the trace.public int get_trace()
public void set_rfCores(int rfCores)
rfCores
- The number of cores to be used by the algorithm when OpenMP
parallel processing is in force. The default behaviour is to
use all cores available. This is achieved by setting the
parameter to a negative value. The result is that each core
will be independently tasked with growing a tree. Significant
savings in elapsed computation times can be achieved.public int get_rfCores()
set_rfCores(int)
public com.kogalur.randomforest.ModelType getModelType()
public void printEnsembleList()
public void printEnsemble(Object ensb)
Copyright © 2018. All rights reserved.