preprocessPredictionData | R Documentation |
Preprocess covariates. DataFrames will be preprocessed based on their column types. Matrices will be passed through assuming all columns are numeric.
preprocessPredictionData(input_data, metadata)
input_data |
Covariates, provided as either a dataframe or a matrix |
metadata |
List containing information on variables, including train set categories for categorical variables |
Preprocessed data with categorical variables appropriately handled
cov_df <- data.frame(x1 = 1:5, x2 = 5:1, x3 = 6:10)
metadata <- list(num_ordered_cat_vars = 0, num_unordered_cat_vars = 0,
num_numeric_vars = 3, numeric_vars = c("x1", "x2", "x3"))
X_preprocessed <- preprocessPredictionData(cov_df, metadata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.