tests/testthat/test_bcsk.R

#export(skIncrPCA)
#export(skPartialPCA_step)
#exportClasses(SkDecomp)
#exportMethods(skIncrPPCA)
#
#library(BiocSklearn)
#
#context("imports")
#test_that("SklearnEls imports complete", {
#if (.Platform$OS.type != "windows") {
# skstuff = SklearnEls()
# expect_true(is.list(skstuff))
# expect_true(all.equal(names(skstuff), c("np", "pd", "h5py", "skd", "skcl", "joblib")))
# }
#})
#      
##
## only this test fails on build system?
##
#
#context("object retrieval")
#test_that("pyobj, skPCA, getTransformed work", {
# if (.Platform$OS.type != "windows") {
#  irloc = system.file("csv/iris.csv", package="BiocSklearn")
#  irismat = SklearnEls()$np$genfromtxt(irloc, delimiter=',')
#  skpi = skPCA(irismat)
#  gt = getTransformed(skpi)
#  expect_true(abs(gt[1,1]+2.684126)<.001)
#  pp = pyobj(skpi)
#  clpca = c("sklearn.decomposition.pca.PCA", "sklearn.decomposition.base._BasePCA", 
# "abc.NewBase", "sklearn.base.BaseEstimator", "sklearn.base.TransformerMixin", 
# "python.builtin.object")
#  #expect_true(all.equal(class(pp), clpca)) # checking to see if this is all that fails on build system
# }
# TRUE
#})
#
vjcitn/BiocSklearn documentation built on Aug. 30, 2024, 2:13 p.m.