knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) library(broom) library(broom.mixed)
library(autostats)
Species is a 3-level factor so it will be automatically modelled with a multiclass neural network and a light gbm with multiclass objective function.
First set define the formula to use for modeling.
iris %>% tidy_formula(target = Species) -> species_formula species_formula
iris %>% auto_variable_contributions(species_formula)
iris %>% auto_model_accuracy(species_formula)
Linear models uses weighted logistic regression for modeling the coefficients
iris %>% filter(Species != "setosa") %>% auto_variable_contributions(species_formula)
For the variable contributions the linear model uses penalized logistic regression provided by glmnet.
iris %>% filter(Species != "setosa") -> iris_binary iris_binary %>% auto_model_accuracy(species_formula)
Models are automatically adapted for a continuous target.
Define the new formula
iris %>% tidy_formula(target = Petal.Length) -> petal_formula petal_formula
iris %>% auto_model_accuracy(petal_formula)
auto anova automatically regresses each continuous variable supplied against each categorical variable supplied. Lm is called separately for each continuous/ categorical variable pair, but the results are reported in one dataframe. Whether the outcome differs amongst categorical levels is determined by the p.value. The interpretation is affected by the choice of baseline for comparison. Traditionally the first level of the factor is used, however option to use the mean of the continuous variable as the baseline intercept is a helpful comparison.
iris %>% auto_anova(Species, matches("Petal"), baseline = "first_level")
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.