hanaml.Partition {hana.ml.r} | R Documentation |
hanaml.Partition is a R wrapper for PAL Partition algorithm.
hanaml.Partition(conn.context, data, key, features = NULL, random.state = NULL, thread.ratio = NULL, method = NULL, stratified.column = NULL, split.ratio = NULL, split.size = NULL)
conn.context |
|
data |
|
key |
|
features |
|
random.state |
Indicates the seed used to initialize the random number generator.
|
thread.ratio |
|
method |
Partition method used for splitting dataset into train, test and validation sets:
|
stratified.column |
|
split.ratio |
|
split.size |
|
R6Class
object.
List of DataFrame
DataFrames for training, testing and validation, arranged in the following order:
1 DataFrame for training,
2 DataFrame for testing,
3 DataFrame for validation.
## Not run: Input DataFrame for Preprocessing: > data$collect() ID HomeOwner MaritalStatus AnnualIncome DefaultedBorrower 1 0 YES Single 125 NO 2 1 NO Married 100 NO 3 2 NO Single 70 NO 4 3 YES Married 120 NO 5 4 NO Divorced 95 YES ... 28 27 NO Single 85 YES 29 28 NO Married 75 YES 30 29 NO Single 90 YES Create partition instance: > partition <- hanaml.Partition(conn, data, random.state = 23, method = "random", split.ratio = c(0.6, 0.2, 0.2)) Expected output: > partition[[1]]$Collect() ID HomeOwner MaritalStatus AnnualIncome DefaultedBorrower 1 0 YES Single 125 NO 2 1 NO Married 100 NO 3 3 YES Married 120 NO 4 5 NO Married 60 NO 5 7 NO Single 85 YES 6 10 YES Single 125 NO 7 12 NO Single 70 NO 8 13 YES Married 120 NO 9 17 NO Single 85 YES 10 18 NO Married 75 NO 11 21 NO Married 100 NO 12 22 NO Single 70 NO 13 23 YES Married 120 NO 14 24 NO Divorced 95 YES 15 25 NO Married 60 NO 16 27 NO Single 85 YES 17 28 NO Married 75 YES 18 29 NO Single 90 YES ## End(Not run)