nroPostprocess: Standardization using existing parameters

View source: R/nroPostprocess.R

nroPostprocessR Documentation

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)

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.

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.

Value

A matrix or data frame of processed values.

Author(s)

Ville-Petteri Makinen

Examples

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

Numero documentation built on Sept. 17, 2024, 5:09 p.m.