This function creates a data frame that contains a grid of complexity
parameters specific methods.
Usage
createGrid(method, len = 3, data = NULL)
Arguments
Value
A data frame where the rows are combinations of tuning parameters and columns correspond to the parameters. The column names should be the parameter names preceded by a dot (e.g. .mtry)
Details
A grid is created with rows corresponding to complexity parameter combinations. If the model does not use tuning parameters (like a linear model), values of NA are returned. Columns are named the same as the parameter name, but preceded by a period.
For some models (see list above), the data should be passed to the function via the data argument. In these cases, the outcome should be included in a column named .outcome.
createGrid("rda", 4)
createGrid("lm")
createGrid("nnet")
## data needed for SVM with RBF:tmp <- iris
names(tmp)[5] <- ".outcome"head(tmp)
createGrid("svmRadial", data = tmp, len = 4)