generateFeature | R Documentation |
This function automatically scans through each variable and generate features based on the type listed in the "details"
generateFeature(data, varlist, type = "Frequent", method = NULL)
data |
[data.frame | Required] dataframe or data.table |
varlist |
[text | Required] variable list to generate the additional features |
type |
[text | Required] variable transformation with type - 'Dummy','Outlier','Frequent' or 'Interaction' |
method |
[text | Required] input for variabe transformation for type = 'Frequent' then the method should be 'Frequency' or 'Percent'. Please refer to the "details" section to know more |
This function is for generating features based on different transformation methods such as interaction, outliers, Dummy coding, etc.
Interaction type
multiply - multiplication
add - addition
substract - substraction
divide - division
Frequency type
Frequency - frequency
Percent - percentage
Outlier type
Flag - flag outlier values like 1 or 0
Capping - impute outlier value by 95th or 5th percentile value
Date type
Year
Month
Quarter
Week
generated transformed features
# Generate interaction features generateFeature(heart, varlist = c("cp", "chol", "trestbps"), type = "Interaction", method = "add") generateFeature(heart, varlist = c("cp", "chol", "trestbps"), type = "Interaction", method = "multiply") # Generate frequency features generateFeature(heart, varlist = c("cp", "thal"), type = "Frequent", method = "Percent") generateFeature(heart, varlist = c("cp", "thal"), type = "Frequent", method = "Frequency")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.