| hanaml.DecisionTreeRegressor {hana.ml.r} | R Documentation |
hanaml.DecisionTreeRegressor is a R wrapper for PAL Decision tree.
hanaml.DecisionTreeRegressor (conn.context, data = NULL,
key = NULL, features = NULL,
label = NULL,formula = NULL,
thread.ratio = NULL,
allow.missing.dependent = NULL,
percentage = NULL,
min.records.of.parent = NULL,
min.records.of.leaf = NULL, max.depth = NULL,
categorical.variable = NULL,
split.threshold = NULL,
use.surrogate = NULL, model.format = NULL,
discretization.type = NULL,
bins = NULL, max.branch = NULL,
merge.threshold = NULL,
output.rules = NULL
)
conn.context |
|
data |
|
key |
|
features |
|
label |
|
formula |
|
thread.ratio |
|
allow.missing.dependent |
|
percentage |
Defaults to 1.0. |
min.records.of.parent |
Defaults to 2. |
min.records.of.leaf |
|
max.depth |
|
categorical.variable |
Indicates features should be treated as categorical. The behavior is dependent on what input is given. 'string': categorical 'integer' and 'double': continuous. VALID only for integer variables; omitted otherwise. The default value is detected from input data. |
split.threshold |
Defaults to 1e-5 for CART. |
use.surrogate |
Defaults to TRUE. |
model.format |
Defaults to 'json'. |
discretization.type |
Defaults to 'mdlpc'. |
bins |
|
max.branch |
|
merge.threshold |
|
output.rules |
|
R6Class object.
A "DecisionTreeRegressor" object with the following attributes:
model : DataFrame Trained model content.
decision.rules : DataFrame Rules for decision tree to make decisions.
confusion.matrix : DataFrame Confusion matrix used to evaluate the performance of classification algorithms.
Using Summary and Print
Summary provides a general summary of the output of the model. Usage: summary(dtr) where dtr is the model generated
Print provides information on the coefficients and the optional parameter values given by the user. Usage: print(dtr) where dtr is the model generated.
## Not run:
Input DataFrame for training:
> head(data$Collect(),5)
OUTLOOK TEMP HUMIDITY WINDY CLASS
1 Sunny 75 70 Yes 1
2 Sunny 80 90 Yes 0
3 Sunny 85 85 No 0
4 Sunny 72 95 No 0
5 Sunny 69 70 No 1
Creating DecisionTreeRegressor model:
>dtr = hanaml.DecisionTreeRegressor( conn,
features = list("A", "B", "C"),label = "LABEL",key = 'ID',
min.records.of.parent = 2, min.records.of.leaf = 1,
thread.ratio = 0.4, split.threshold = 1e-5,
model.format = 'pmml', output.rules = TRUE )
Giving input to fit as a formula:
>dtr = hanaml.DecisionTreeRegressor( conn,
formula=LABEL~A+B+C,,key = NULL,
min.records.of.parent = 2, min.records.of.leaf = 1,
thread.ratio = 0.4, split.threshold = 1e-5,
model.format = 'pmml', output.rules = TRUE
## End(Not run)