#include "party.h"
Go to the source code of this file.
Functions | |
void | C_splitnode (SEXP node, SEXP learnsample, SEXP control) |
SEXP | C_get_node (SEXP subtree, SEXP newinputs, double mincriterion, int numobs, int varperm) |
SEXP | R_get_node (SEXP subtree, SEXP newinputs, SEXP mincriterion, SEXP numobs) |
SEXP | C_get_nodebynum (SEXP subtree, int nodenum) |
SEXP | R_get_nodebynum (SEXP subtree, SEXP nodenum) |
SEXP | C_get_prediction (SEXP subtree, SEXP newinputs, double mincriterion, int numobs, int varperm) |
SEXP | C_get_nodeweights (SEXP subtree, SEXP newinputs, double mincriterion, int numobs) |
int | C_get_nodeID (SEXP subtree, SEXP newinputs, double mincriterion, int numobs) |
SEXP | R_get_nodeID (SEXP tree, SEXP newinputs, SEXP mincriterion) |
void | C_predict (SEXP tree, SEXP newinputs, double mincriterion, int varperm, SEXP ans) |
SEXP | R_predict (SEXP tree, SEXP newinputs, SEXP mincriterion) |
SEXP | R_predict2 (SEXP tree, SEXP newinputs, SEXP mincriterion, SEXP varperm) |
void | C_getpredictions (SEXP tree, SEXP where, SEXP ans) |
SEXP | R_getpredictions (SEXP tree, SEXP where) |
SEXP | R_predictRF_weights (SEXP forest, SEXP where, SEXP weights, SEXP newinputs, SEXP mincriterion, SEXP oobpred) |
SEXP | R_proximity (SEXP where) |
Node splitting and prediction
Definition in file Predict.c.
SEXP C_get_node | ( | SEXP | subtree, | |
SEXP | newinputs, | |||
double | mincriterion, | |||
int | numobs, | |||
int | varperm | |||
) |
Get the terminal node for obs. number `numobs' of `newinputs'
subtree | a tree | |
newinputs | an object of class `VariableFrame' | |
mincriterion | overwrites mincriterion used for tree growing | |
numobs | observation number | |
varperm | which variable shall be permuted? |
Definition at line 121 of file Predict.c.
References C_i_in_set(), get_missings(), get_variable(), has_missings(), S3get_leftnode(), S3get_maxcriterion(), S3get_nodeterminal(), S3get_primarysplit(), S3get_rightnode(), S3get_splitpoint(), S3get_sumweights(), S3get_surrogatesplits(), S3get_toleft(), S3get_variableID(), and S3is_ordered().
Referenced by C_get_nodeID(), C_get_nodeweights(), C_get_prediction(), and R_get_node().
SEXP C_get_nodebynum | ( | SEXP | subtree, | |
int | nodenum | |||
) |
Get the node with nodeID `nodenum'
subtree | a tree | |
nodenum | a nodeID |
Definition at line 256 of file Predict.c.
References S3get_leftnode(), S3get_nodeID(), S3get_nodeterminal(), and S3get_rightnode().
Referenced by C_getpredictions(), R_get_nodebynum(), and R_predictRF_weights().
int C_get_nodeID | ( | SEXP | subtree, | |
SEXP | newinputs, | |||
double | mincriterion, | |||
int | numobs | |||
) |
Get the nodeID for a new observation
subtree | a tree | |
newinputs | an object of class `VariableFrame' | |
mincriterion | overwrites mincriterion used for tree growing | |
numobs | observation number |
Definition at line 321 of file Predict.c.
References C_get_node(), and S3get_nodeID().
Referenced by R_get_nodeID(), and R_predictRF_weights().
SEXP C_get_nodeweights | ( | SEXP | subtree, | |
SEXP | newinputs, | |||
double | mincriterion, | |||
int | numobs | |||
) |
Get the weights for a new observation
subtree | a tree | |
newinputs | an object of class `VariableFrame' | |
mincriterion | overwrites mincriterion used for tree growing | |
numobs | observation number |
Definition at line 306 of file Predict.c.
References C_get_node(), and S3get_nodeweights().
SEXP C_get_prediction | ( | SEXP | subtree, | |
SEXP | newinputs, | |||
double | mincriterion, | |||
int | numobs, | |||
int | varperm | |||
) |
Get the prediction of a new observation
subtree | a tree | |
newinputs | an object of class `VariableFrame' | |
mincriterion | overwrites mincriterion used for tree growing | |
numobs | observation number | |
varperm | which variable shall be permuted? |
Definition at line 291 of file Predict.c.
References C_get_node(), and S3get_prediction().
Referenced by C_predict().
void C_getpredictions | ( | SEXP | tree, | |
SEXP | where, | |||
SEXP | ans | |||
) |
Get the predictions from `where' nodes
tree | a tree | |
where | vector of nodeID's | |
ans | return value |
Definition at line 423 of file Predict.c.
References C_get_nodebynum(), and S3get_prediction().
Referenced by R_getpredictions().
void C_predict | ( | SEXP | tree, | |
SEXP | newinputs, | |||
double | mincriterion, | |||
int | varperm, | |||
SEXP | ans | |||
) |
Get all predictions for `newinputs'
tree | a tree | |
newinputs | an object of class `VariableFrame' | |
mincriterion | overwrites mincriterion used for tree growing | |
varperm | which variable shall be permuted? | |
ans | return value |
Definition at line 359 of file Predict.c.
References C_get_prediction(), and get_nobs().
Referenced by R_predict(), and R_predict2().
void C_splitnode | ( | SEXP | node, | |
SEXP | learnsample, | |||
SEXP | control | |||
) |
Split a node according to a splitting rule
node | the current node with primary split specified | |
learnsample | learning sample | |
control | an object of class `TreeControl' |
Definition at line 21 of file Predict.c.
References C_init_node(), get_maxsurrogate(), get_missings(), get_ninputs(), get_nobs(), get_predict_trafo(), get_splitctrl(), get_variable(), has_missings(), i_in_set(), ncol(), NODE_LENGTH, PL2_inputsSym, PL2_responsesSym, S3_LEFT, S3_RIGHT, S3get_nodeweights(), S3get_primarysplit(), S3get_splitpoint(), S3get_variableID(), and S3is_ordered().
Referenced by C_TreeGrow().
SEXP R_get_node | ( | SEXP | subtree, | |
SEXP | newinputs, | |||
SEXP | mincriterion, | |||
SEXP | numobs | |||
) |
R-Interface to C_get_node
subtree | a tree | |
newinputs | an object of class `VariableFrame' | |
mincriterion | overwrites mincriterion used for tree growing | |
numobs | observation number |
Definition at line 243 of file Predict.c.
References C_get_node().
SEXP R_get_nodebynum | ( | SEXP | subtree, | |
SEXP | nodenum | |||
) |
R-Interface to C_get_nodenum
subtree | a tree | |
nodenum | a nodeID |
Definition at line 277 of file Predict.c.
References C_get_nodebynum().
SEXP R_get_nodeID | ( | SEXP | tree, | |
SEXP | newinputs, | |||
SEXP | mincriterion | |||
) |
R-Interface to C_get_nodeID
tree | a tree | |
newinputs | an object of class `VariableFrame' | |
mincriterion | overwrites mincriterion used for tree growing |
Definition at line 335 of file Predict.c.
References C_get_nodeID(), and get_nobs().
SEXP R_getpredictions | ( | SEXP | tree, | |
SEXP | where | |||
) |
R-Interface to C_getpredictions
tree | a tree | |
where | vector of nodeID's |
Definition at line 444 of file Predict.c.
References C_getpredictions().
SEXP R_predict | ( | SEXP | tree, | |
SEXP | newinputs, | |||
SEXP | mincriterion | |||
) |
R-Interface to C_predict
tree | a tree | |
newinputs | an object of class `VariableFrame' | |
mincriterion | overwrites mincriterion used for tree growing |
Definition at line 381 of file Predict.c.
References C_predict(), and get_nobs().
SEXP R_predict2 | ( | SEXP | tree, | |
SEXP | newinputs, | |||
SEXP | mincriterion, | |||
SEXP | varperm | |||
) |
R-Interface to C_predict
tree | a tree | |
newinputs | an object of class `VariableFrame' | |
mincriterion | overwrites mincriterion used for tree growing | |
varperm | which variable shall be permuted? |
Definition at line 402 of file Predict.c.
References C_predict(), and get_nobs().
SEXP R_predictRF_weights | ( | SEXP | forest, | |
SEXP | where, | |||
SEXP | weights, | |||
SEXP | newinputs, | |||
SEXP | mincriterion, | |||
SEXP | oobpred | |||
) |
Predictions weights from RandomForest objects
forest | a list of trees | |
where | list (length b) of integer vectors (length n) containing terminal node numbers | |
weights | list (length b) of bootstrap case weights | |
newinputs | an object of class `VariableFrame' | |
mincriterion | overwrites mincriterion used for tree growing | |
oobpred | a logical indicating out-of-bag predictions |
Definition at line 466 of file Predict.c.
References C_get_nodebynum(), C_get_nodeID(), get_nobs(), and S3get_prediction().