Learn R Programming

lessSEM (version 1.5.5)

cvScaler: cvScaler

Description

uses the means and standard deviations of the training set to standardize the test set. See, e.g., https://scikit-learn.org/stable/modules/cross_validation.html .

Usage

cvScaler(testSet, means, standardDeviations)

Value

scaled test set

Arguments

testSet

test data set

means

means of the training set

standardDeviations

standard deviations of the training set

Examples

Run this code
library(lessSEM)
data <- matrix(rnorm(50),10,5)

cvScaler(testSet = data, 
         means = 1:5, 
         standardDeviations = 1:5)

Run the code above in your browser using DataLab