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

Make Transform from a "FeatureNormalizer" Object

Description

Similar to other transform methods, this function transformed values from a fitted "FeatureNormalizer" object.

Usage

## S3 method for class 'FeatureNormalizer'
transform(model, data, key, features = NULL,
  thread.ratio = NULL, division.by.zero.handler = NULL)

Arguments

model

R6Class object
A "FeatureNormalizer" Object.

data

DataFrame
Data to be analyzed.

key

character
Name of the ID column.

features

list of characters, optional
Names of the feature columns.
If features is not provided, it defaults to all non-ID columns.

thread.ratio

double, 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 that percentage of available threads. Values outside this range are ignored. Does not affect transform().
Defaults to 0.

division.by.zero.handler

logical, optional
If TRUE, Throws an error when encountering a division by zero. If FALSE, ignores the column when encountering a division by zero. The column is not scaled.

Value

Dataframe
Transformed variable values corresponding to each data point, structured as follows:

See Also

FeatureNormalizer

Examples

## Not run: 
 Input DataFrame data2 for transform:
 > data2$Collect()
     ID S_X1 S_X2
   1  0    6    9
   2  1    6    7
   3  2    4    4
   4  3    1    2
   5  4    9   -2

Perform transform() on the given data2 and "FeatureNormalizer" Object fn:

> result <- transform(fn, data = data2, key = "ID")

Output:

> result$Collect()
    ID        S_X1        S_X2
  1  0  0.00000000  0.03317536
  2  1  0.00000000 -0.06161137
  3  2 -0.06116208 -0.20379147
  4  3 -0.15290520 -0.29857820
  5  4  0.09174312 -0.48815166
  6  5 -0.06116208 -0.15639810


## End(Not run)

[Package hana.ml.r version 1.0.8 Index]