View source: R/HelperFunctions.R
PreProcessing | R Documentation |
The following actions are carried out: 1. data.frames are converted to matrix form and labels converted to an indicator matrix 2. An intercept column is added if requested 3. centering and scaling is applied if requested.
PreProcessing(X, y, X_u = NULL, scale = FALSE, intercept = FALSE,
x_center = FALSE, use_Xu_for_scaling = TRUE)
X |
Design matrix, intercept term is added within the function |
y |
Vector or factor with class assignments |
X_u |
Design matrix of the unlabeled observations |
scale |
If TRUE, apply a z-transform to the design matrix X |
intercept |
Whether to include an intercept in the design matrices |
x_center |
logical (default: TRUE); Whether the feature vectors should be centered |
use_Xu_for_scaling |
logical (default: TRUE); Should the unlabeled data be used to determine scaling? |
list object with the following objects:
X |
design matrix of the labeled data |
y |
integer vector indicating the labels of the labeled data |
X_u |
design matrix of the unlabeled data |
classnames |
names of the classes corresponding to the integers in y |
scaling |
a scaling object used to scale the test observations in the same way as the training set |
modelform |
a formula object containing the used model |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.