Numero (version 1.9.6)

nroPostprocess: Standardization using existing parameters

Description

Process a new dataset using a standardization procedure that was created for another dataset

Usage

nroPostprocess(data, mapping, reverse = FALSE, trim = FALSE)

Value

A matrix or data frame of processed values.

Arguments

data

A matrix or a data frame with column names.

mapping

A list object or a matrix or a data frame.

reverse

If true, standardized data will be reverted back to original scale.

trim

If true, unusable rows and columns are removed.

Author

Ville-Petteri Makinen

Details

The input argument can be a data frame with the attribute 'mapping' as returned from nroPreprocess() or a list object with the elements input and output that each contain a data frame or a matrix of equal size.

The function projects the input data to the values in mapping$input to determine the positions of the input values with respect to the rows in the model. These positions are then used to interpolate corresponding output values in mapping$output.

The mapping elements must have consistent row and column names.

Examples

Run this code
# Import data.
fname <- system.file("extdata", "finndiane.txt", package = "Numero")
dataset <- read.delim(file = fname)

# Show original data characteristics.
print(summary(dataset))

# Preprocess a subset of data.
ds.pre <- nroPreprocess(dataset[1:100,])
print(summary(ds.pre))

# Repeat preprocessing for the whole dataset (approximation).
ds.post <- nroPostprocess(dataset, ds.pre)
print(summary(ds.post))

Run the code above in your browser using DataLab