Skip to content

Commit

Permalink
no tidyverse in vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
bcjaeger committed Dec 8, 2023
1 parent 70ef52b commit cd585ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions vignettes/oobag.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ In random forests, each tree is grown with a bootstrapped version of the trainin

Each tree in the random forest can make predictions for its out-of-bag data, and the out-of-bag predictions can be aggregated to make an ensemble out-of-bag prediction. Since the out-of-bag data are not used to grow the tree, the accuracy of the ensemble out-of-bag predictions approximate the generalization error of the random forest. Out-of-bag prediction error plays a central role for some routines that estimate variable importance, e.g. negation importance.

Let's fit an oblique random survival forest and plot the distribution of the ensemble out-of-bag predictions.
We fit an oblique random survival forest and plot the distribution of the ensemble out-of-bag predictions.

```{r}
Expand All @@ -43,11 +43,11 @@ fit <- orsf(data = pbc_orsf,
oobag_pred_horizon = 2000)
hist(fit$pred_oobag,
main = 'Ensemble out-of-bag survival predictions at t=3,500')
main = 'Out-of-bag survival predictions at t=2,000')
```

Not surprisingly, all of the survival predictions are between 0 and 1. Next, let's check the out-of-bag accuracy of `fit`:
Next, let's check the out-of-bag accuracy of `fit`:

```{r}
Expand Down
2 changes: 1 addition & 1 deletion vignettes/pd.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ knitr::opts_chunk$set(

```{r}
library(aorsf)
library(tidyverse)
library(ggplot2)
```

You can compute PD and individual conditional expectation (ICE) in three ways:
Expand Down

0 comments on commit cd585ea

Please sign in to comment.