tests/testthat/test-see_variables_impact.R

test_that("see_variables_impact works", {
  expect_silent(see_variables_impact(nn=neuralnetwork(x~a, hidden=0, startweights = list(matrix(c(0.2, 0.5), ncol=1)), linear.output = TRUE)))
  expect_silent(see_variables_impact(nn=neuralnetwork(x~a, hidden=1, linear.output = TRUE)))
  expect_silent(see_variables_impact(nn=neuralnetwork(x~a, hidden=c(2, 1), linear.output = TRUE)))
  expect_silent(see_variables_impact(nn=neuralnetwork(x~a+b, hidden=c(2, 1), linear.output = TRUE)))
  expect_silent(see_variables_impact(nn=neuralnetwork(x+y~a+b, hidden=c(2, 1), linear.output = TRUE)))

})
wiper8/AI documentation built on Dec. 23, 2021, 5:15 p.m.