tests/testthat/test-normalizedgini.R

context("test-normalizedgini")

test_that("Gini works", {
  expect_error(normalizedGini(c(1, 1, 1, 0, 0), c(0.7, 0.9, 0.5, 0.6)))
  expect_true(normalizedGini(c(1, 1, 1, 0, 0), c(0.7, 0.9, 0.5, 0.6, 0.3)) <= 1)
  expect_true(normalizedGini(c(1, 1, 1, 0, 0), c(0.7, 0.9, 0.5, 0.6, 0.3)) >= 0)
})
adimajo/glmdisc documentation built on March 7, 2024, 7:47 p.m.