transform.Imputer {hana.ml.r} | R Documentation |
Similar to other transform methods, this function transforms fitted values from a fitted "Imputer" object.
## S3 method for class 'Imputer' transform(model, data, key = NULL, thread.ratio = NULL)
model |
|
data |
|
key |
|
thread.ratio |
The following parameters all have pre-fix 'als\_', and are invoked only when
als' is the overall imputation strategy. Those parameters are for setting
up the alternating-least-square(ALS) mdoel for data imputation. Defaults to 0.0. |
transformed values are returned as a DataFrame, structured as follows.
DataFrame 1 :
Result DataFrame. The same column structure (number of columns, column names, and column
types) with the table with which the model is trained.
DataFrame 2 : DataFrame
Statistics DataFrame.
## Not run: Perform the transform on DataFrame data2 using "imputer" object ip: > data2$Collect() ID V0 V1 V2 V3 V4 V5 1 0 20 1 B NULL 1.5 21.7 2 1 40 1 <NULL> 0.6 1.2 24.3 3 2 NULL 0 D NULL 1.8 22.6 4 3 50 NULL C 0.7 1.1 NULL 5 4 20 1 A 0.3 NULL 20.6 > result <- transform(ip, data2) > result[[1]]$Collect() ID V0 V1 V2 V3 V4 V5 1 0 20 1 B 0.5076923 1.500000 21.70000 2 1 40 1 A 0.6000000 1.200000 24.30000 3 2 24 0 D 0.5076923 1.800000 22.60000 4 3 50 0 C 0.7000000 1.100000 20.64615 5 4 20 1 A 0.3000000 1.469231 20.60000 ## End(Not run)