R Under development (unstable) (2025-05-04 r88189 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ### simulateData > # test extreme values > library(nlcv) Loading required package: a4Core Loading required package: MLInterfaces Loading required package: Rcpp Loading required package: BiocGenerics Loading required package: generics Attaching package: 'generics' The following objects are masked from 'package:base': as.difftime, as.factor, as.ordered, intersect, is.element, setdiff, setequal, union Attaching package: 'BiocGenerics' The following objects are masked from 'package:stats': IQR, mad, sd, var, xtabs The following objects are masked from 'package:base': Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append, as.data.frame, basename, cbind, colnames, dirname, do.call, duplicated, eval, evalq, get, grep, grepl, is.unsorted, lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind, rownames, sapply, saveRDS, table, tapply, unique, unsplit, which.max, which.min Loading required package: Biobase Welcome to Bioconductor Vignettes contain introductory material; view with 'browseVignettes()'. To cite Bioconductor, see 'citation("Biobase")', and for packages 'citation("pkgname")'. Loading required package: annotate Loading required package: AnnotationDbi Loading required package: stats4 Loading required package: IRanges Loading required package: S4Vectors Attaching package: 'S4Vectors' The following object is masked from 'package:utils': findMatches The following objects are masked from 'package:base': I, expand.grid, unname Attaching package: 'IRanges' The following object is masked from 'package:grDevices': windows Loading required package: XML Loading required package: cluster Loading required package: xtable nlcv version 0.3.6 > > library(a4Core) > myEset <- simulateData(nCols = 40, nRows = 1000, nEffectRows = 0) > > ### check the converter works as expected > set.seed(120) > x <- matrix(rnorm(1000*20), ncol=20) > y <- sample(c(1:4), size=20, replace=TRUE) > > traindf <- cbind.data.frame(t(x[,1:15]), y = y[1:15]) > alldf <- cbind.data.frame(t(x), y) > > pamrMLObj <- pamrML(y ~ ., traindf) 123456789101112131415161718192021222324252627282930> > nlcv:::pamrIconverter(obj = pamrMLObj, data = alldf, trainInd = 1:15) MLInterfaces classification output container The call was: ``() Predicted outcome distribution for test set: 2 3 4 1 3 1 > > ### test pamrI for an ExpressionSet > EsetStrongSignal <- simulateData(nCols = 40, nRows = 1000, nEffectRows = 10, nNoEffectCols = 0, + betweenClassDifference = 3, withinClassSd = 0.5) > > library(MLInterfaces) > idxTrain <- sample(1:40, 20) > mlobj <- MLearn(type ~ ., + data = EsetStrongSignal, + .method = pamrI, + trainInd = idxTrain) [1] "type" 123456789101112131415161718192021222324252627282930> > mlobj MLInterfaces classification output container The call was: MLearn(formula = type ~ ., data = EsetStrongSignal, .method = pamrI, trainInd = idxTrain) Predicted outcome distribution for test set: A B 10 10 > > # nlda (to check export of predict.lda) > > mlNldaObj <- MLearn(type ~ ., + data = EsetStrongSignal, + .method = nldaI, + trainInd = idxTrain) [1] "type" Warning message: In lda.default(x, grouping, ...) : variables are collinear > > > > > proc.time() user system elapsed 8.51 0.78 9.28