transform.Imputer {hana.ml.r}R Documentation

Make transformation from a "Imputer" Object

Description

Similar to other transform methods, this function transforms fitted values from a fitted "Imputer" object.

Usage

## S3 method for class 'Imputer'
transform(model, data, key = NULL,
  thread.ratio = NULL)

Arguments

model

R6Class object
"Imputer" object for transformation.

data

DataFrame
Data for transformation.

key

character, optional
Name of the ID column in data that specifies the dependent variable.

thread.ratio

integer, optional
Controls the proportion of available threads to use. The value range is from 0 to 1, where 0 indicates a single thread, and 1 indicates up to all available threads. Values between 0 and 1 will use up to that percentage of available threads. Values outside this range tell PAL to heuristically determine the number of threads to use.

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.

Value

transformed values are returned as a DataFrame, structured as follows.

See Also

hanaml.Imputer

Examples

## 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)

[Package hana.ml.r version 1.0.8 Index]