
Last chance! 50% off unlimited learning
Sale ends in
AutoTransformationCreate is a function for automatically identifying the optimal transformations for numeric features and transforming them once identified. This function will loop through your selected transformation options (YeoJohnson, BoxCox, Asinh, Asin, and Logit) and find the one that produces data that is the closest to normally distributed data. It then makes the transformation and collects the metadata information for use in the AutoTransformationScore() function, either by returning the objects (always) or saving them to file (optional).
AutoTransformationCreate(data, ColumnNames = NULL,
Methods = c("BoxCox", "YeoJohnson", "Asinh", "Asin", "Logit"),
Path = NULL, TransID = "ModelID", SaveOutput = FALSE)
This is your source data
List your columns names in a vector, for example, c("Target", "IV1")
Choose from "YeoJohnson", "BoxCox", "Asinh", "Asin", and "Logit". "Identity" is always run.
Set to the directly where you want to save all of your modeling files
Set to a character value that corresponds with your modeling project
Set to TRUE to save necessary file to run AutoTransformationScore()
data with transformed columns and the transformation object for back-transforming later
Other Feature Engineering: AutoDataPartition
,
AutoTransformationScore
,
AutoWord2VecModeler
,
CreateCalendarVariables
,
DT_GDL_Feature_Engineering
,
DummifyDT
,
GDL_Feature_Engineering
,
ModelDataPrep
,
Partial_DT_GDL_Feature_Engineering2
,
Partial_DT_GDL_Feature_Engineering
,
Scoring_GDL_Feature_Engineering
# NOT RUN {
Correl <- 0.85
N <- 1000
data <- data.table::data.table(Adrian = runif(N))
data[, x1 := qnorm(Adrian)]
data[, x2 := runif(N)]
data[, Adrian1 := log(pnorm(Correl * x1 +
sqrt(1-Correl^2) * qnorm(x2)))]
data <- AutoTransformationCreate(data,
ColumnNames = "Sample",
Methods = c("BoxCox","Asin"),
Path = NULL,
TransID = "Trans",
SaveOutput = FALSE)
# }
Run the code above in your browser using DataLab