View source: R/nroPostprocess.R
nroPostprocess | R Documentation |
Process a new dataset using a standardization procedure that was created for another dataset
nroPostprocess(data, mapping, reverse = FALSE, trim = FALSE)
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. |
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.
A matrix or data frame of processed values.
Ville-Petteri Makinen
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.