preprocess_testing: preprocess_testing

View source: R/R_preprocessing.R

preprocess_testingR Documentation

preprocess_testing

Description

Perform preprocessing for the testing data, including converting data to dataframe, and testing if the columns are consistent with the training data and encoding categorical data into numerical representation in the same way as training data.

Usage

preprocess_testing(x, categoricalFeatureCols, categoricalFeatureMapping)

Arguments

x

A data frame of all training predictors.

categoricalFeatureCols

A list of index for all categorical data. Used for trees to detect categorical columns.

categoricalFeatureMapping

A list of encoding details for each categorical column, including all unique factor values and their corresponding numeric representation.

Value

A preprocessed training dataaset x


Rforestry documentation built on March 31, 2023, 11:33 p.m.