autoGAM_frame.Rd
Automatic evaluation of different forms (functions) of predictors to obtain the best Generalized Additive Model (GAM).
autoGAM_frame( formula, resp.base = NULL, forms = list("identity", "logb", "exp", power = 2:3, poly = 2:3), data, ignore.outliers = F, family = gaussian(link = "identity"), metric = "AIC", raw.poly = F, interval.alpha = 0.05, parallel = F, core.nums = NULL )
formula | A simple formula object with one response and predictor(s). |
---|---|
resp.base | Base level of the binary response variable. Default is |
forms | A named list of continuous predictor(s) form(s) with their respected degree(s) or degree(s) of freedom. Famous functions that one can think of are |
data | Dataset containing the response and all the predictors that were included in the formula. |
ignore.outliers | Logical indicating whether outliers should be ignored during the evaluation process of predictors forms or not. Default is |
family | Family for the response variable in model fits. Default is |
metric | The name of the metric to be used for evaluation of GLMs performances. Valid values are |
raw.poly | Logical indicating whether raw forms of polynomials should be included when polynomial forms ( |
interval.alpha | Numerical value of alpha for the creation of confidence intervals of predictions. Default value is 0.05. |
parallel | Logical indicating whether the evaluation process of different forms must be done in parallel mode or not. Default is |
core.nums | Number of cores to be used in parallelization process. The default is |
A comprehensive list containing information of the whole evaluation process. By default, autoGAM shows final best forms of continuous predictors and the final set of categorical variables but they are part of a bigger list. You can access all items of the list via:
$data
: Dataset that was used to create different models in the evaluation process.
$`forms info`
: A nested data frame including full information of evaluation process. It includes values and predictions for all form(s) on all predictor(s).
$`best forms`
: Final best form of continuous predictors that were obtained from the evaluation process.
$`final predictors`
: Final predictors (best form of continuous predictors and categorical predictors) that are included in the best GAM model. If the backward argument was set to FALSE, best forms of continuous predictors (and possibly the categorical variables) are returned.
$`response family`
: The family of the model's response. This item is for internal use!
Shahin Roshani
if (FALSE) autoGAM_frame(mpg~disp+drat+vs,data=mtcars %>% mutate_at('vs',as.factor))