Description Usage Arguments Details Value Examples
This function automatically scans through each variable and generate features based on the type listed in the "details"
1 | 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
1 2 3 4 5 6 7 8 9 | # 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.