#include "party.h"
Go to the source code of this file.
Functions | |
void | C_prediction (const double *y, int n, int q, const double *weights, const double sweights, double *ans) |
void | C_Node (SEXP node, SEXP learnsample, SEXP weights, SEXP fitmem, SEXP controls, int TERMINAL) |
SEXP | R_Node (SEXP learnsample, SEXP weights, SEXP fitmem, SEXP controls) |
Definition in file Node.c.
void C_Node | ( | SEXP | node, | |
SEXP | learnsample, | |||
SEXP | weights, | |||
SEXP | fitmem, | |||
SEXP | controls, | |||
int | TERMINAL | |||
) |
The main function for all node computations
node | an initialized node (an S3 object!) | |
learnsample | an object of class `LearningSample' | |
weights | case weights | |
fitmem | an object of class `TreeFitMemory' | |
controls | an object of class `TreeControl' | |
TERMINAL | logical indicating if this node will be a terminal node |
Definition at line 48 of file Node.c.
Referenced by C_TreeGrow(), and R_Node().
void C_prediction | ( | const double * | y, | |
int | n, | |||
int | q, | |||
const double * | weights, | |||
const double | sweights, | |||
double * | ans | |||
) |
Compute prediction of a node
y | the response variable (raw numeric values or dummy encoded factor) | |
n | number of observations | |
q | number of columns of y | |
weights | case weights | |
sweights | sum of case weights | |
ans | return value; the q-dimensional predictions |
Definition at line 22 of file Node.c.
Referenced by C_Node().
SEXP R_Node | ( | SEXP | learnsample, | |
SEXP | weights, | |||
SEXP | fitmem, | |||
SEXP | controls | |||
) |
R-interface to C_Node
learnsample | an object of class `LearningSample' | |
weights | case weights | |
fitmem | an object of class `TreeFitMemory' | |
controls | an object of class `TreeControl' |
Definition at line 227 of file Node.c.
References C_init_node(), C_Node(), get_maxsurrogate(), get_ninputs(), get_nobs(), get_predict_trafo(), get_splitctrl(), ncol(), NODE_LENGTH, and PL2_responsesSym.