diff --git a/vignettes/aorsf.Rmd b/vignettes/aorsf.Rmd index d6a3d36b..2938fc86 100644 --- a/vignettes/aorsf.Rmd +++ b/vignettes/aorsf.Rmd @@ -29,7 +29,7 @@ The oblique random forest (RF) is an extension of the traditional (axis-based) R The purpose of `aorsf` ('a' is short for accelerated) is to provide a unifying framework to fit oblique RFs that can scale adequately to large data sets. The fastest algorithms available in the package are used by default because they often have equivalent prediction accuracy to more computational approaches. -Everything in `aorsf` begins with the `orsf()` function. Here we begin with an oblique RF for survival using the `pbc_orsf` data, an oblique RF for classification using the `penguins_orsf` data, and FILL IN FOR REGRESSION. Note that `n_tree` is 5 for convenience in these examples, but should be >= 500 in practice. +Everything in `aorsf` begins with the `orsf()` function. Here we begin with an oblique RF for survival using the `pbc_orsf` data. Note that `n_tree` is 5 for convenience in these examples, but should be >= 500 in practice. ```{r} @@ -42,6 +42,12 @@ pbc_fit <- orsf(data = pbc_orsf, pbc_fit +``` + +Next, an oblique RF for classification using the `penguins_orsf` data: + +```{r} + # An oblique classification RF penguin_fit <- orsf(data = penguins_orsf, n_tree = 5, @@ -49,8 +55,13 @@ penguin_fit <- orsf(data = penguins_orsf, penguin_fit -# An oblique regression RF +``` + +and for regression, we use the `mtcars` data: +```{r} + +# An oblique regression RF cars_fit <- orsf(data = mtcars, n_tree = 5, formula = mpg ~ .)