tests/testthat/test-autoscale.R

# autoscale
test_that('autoscale',{
  set.seed('57475')
  # DatasetExperiment
  D=iris_DatasetExperiment()
  # method
  M = autoscale()
  # apply
  M = model_train(M,D)
  # predict
  M = model_predict(M,D)
  expect_equal(M$autoscaled$data[1,1],-0.897,tolerance=0.001)
})

Try the structToolbox package in your browser

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

structToolbox documentation built on Nov. 8, 2020, 6:54 p.m.