Skip to content

Commit

Permalink
split the surv/clsf/regr blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
bcjaeger committed Nov 17, 2023
1 parent a88af48 commit c92a564
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions vignettes/aorsf.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -42,15 +42,26 @@ 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,
formula = species ~ .)
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 ~ .)
Expand Down

0 comments on commit c92a564

Please sign in to comment.