Skip to content

Commit

Permalink
Use performance::check_predictions()
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Apr 2, 2024
1 parent 8ca6f57 commit a4611f2
Show file tree
Hide file tree
Showing 10 changed files with 662 additions and 662 deletions.
2 changes: 1 addition & 1 deletion R/data_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#' - \link[=plot.see_check_outliers]{performance::check_outliers()}
#' - \link[=plot.see_compare_performance]{performance::compare_performance()}
#' - \link[=plot.see_performance_roc]{performance::performance_roc()}
#' - \link[=plot.see_performance_pp_check]{performance::check_posterior_predictions()}
#' - \link[=plot.see_performance_pp_check]{performance::check_predictions()}
#'
#' @param x An object.
#' @param data The original data used to create this object. Can be a
Expand Down
2 changes: 1 addition & 1 deletion man/data_plot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified man/figures/performance-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tests/testthat/test-plot.performance_pp_check.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
test_that("`print.see_performance_pp_check()` works", {
set.seed(123)
model <- lm(Sepal.Length ~ Species * Petal.Width + Petal.Length, data = iris)
result <- performance::check_posterior_predictions(model)
result <- performance::check_predictions(model)

vdiffr::expect_doppelganger(
title = "pp check - lm",
Expand Down
4 changes: 2 additions & 2 deletions vignettes/performance.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,15 @@ _([related function documentation](https://easystats.github.io/performance/refer

```{r}
model <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
check_posterior_predictions(model)
check_predictions(model)
```

To check if the model properly captures the variation in the data, use
`check_range = TRUE`:

```{r}
model <- lm(mpg ~ wt + cyl + gear + disp, data = mtcars)
check_posterior_predictions(model, check_range = TRUE)
check_predictions(model, check_range = TRUE)
```

# Overall Model Check
Expand Down

0 comments on commit a4611f2

Please sign in to comment.