tests/testthat/test_utils-misc.R

library(lgpr)

# -------------------------------------------------------------------------
context("Miscellaneous utility functions")

test_that("link_inv functions are inverses of the link functions", {
  x <- c(1.2, -1, 0, 2)
  for (likelihood in likelihood_list()) {
    y <- link_inv(x, likelihood)
    expect_equal(x, link(y, !!likelihood))
  }
})

Try the lgpr package in your browser

Any scripts or data that you put into this service are public.

lgpr documentation built on Sept. 24, 2023, 9:06 a.m.