transform.FeatureNormalizer.Rd
Similar to other transform methods, this function transformed values from a fitted "FeatureNormalizer" object.
# S3 method for FeatureNormalizer
transform(
model,
data,
key,
features = NULL,
thread.ratio = NULL,
division.by.zero.handler = NULL
)
R6Class object
A "FeatureNormalizer" Object.
DataFrame
DataFrame containting the data.
character
Name of the ID column.
character of list of characters, optional
Name of feature columns for prediction.
If not provided, it defaults to all non-key columns of data.
double, optional
Controls the proportion of available threads that can be used by this
function.
The value range is from 0 to 1, where 0 indicates a single thread,
and 1 indicates all available threads.
Values between 0 and 1 will use up to
that percentage of available threads.Values outside this
range are ignored.
Defaults to 0.
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.
Dataframe
Transformed variable values corresponding to each data point,
structured as follows:
ID column, with same name and type as data's ID column.
Score columns, type DOUBLE, representing the component score values of each data point.
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