tests/testthat/test-score.R

test_that("normalization-threshlding", {
                                  x = { set.seed(223); sort(runif(10, -3, 3)) }
                                  y = score(x, relu, 'positive')
                             expect_identical(isTRUE(all(y >= 0)), TRUE)
                                  z = 1:9
                                 zz = z/max(z)
                                  A = score(z, range, NULL, 0, 9)
                             expect_equal(A, zz)
})

Try the akin package in your browser

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

akin documentation built on May 19, 2026, 5:07 p.m.