Description Usage Arguments Value Examples
In many machinelearning projects you want to start with original values, but also transformations of those values. This function combines all transformations into 1 nested dataframe that contains the transformed data frames
1 2 | create_starterframe(transformations = list(), y = NULL, .suffix = NULL,
.prefix = NULL)
|
transformations |
a named list of transformations |
y |
the values you want to predict, can be empty |
.suffix |
a vector of the same length as the transformation list that contains the suffix you want to apply to your variables |
.prefix |
a vector of the same length as the transformation list that contains the prefix you want to apply to your variables |
a nested data frame with trainingsets, name and y values (if supplied)
1 2 3 4 5 6 7 8 9 10 11 | \notrun{
library(mlbench)
data("BostonHousing")
prepTrain <- preProcess(x = BostonHousing[,preds.original], method = c('BoxCox'))
data_transformation(list(
original = BostonHousing[,1:13],
boxcoxed = predict(prepTrain,newdata = BostonHousing[,preds.original]),
squared = (BostonHousing[,c(1:3,5:13)])^2
),
.suffix = c(NA, "boxed","squared"))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.