Dear Cardinal,
I tried to run opls-da by Cardinal with test data, but the result seems strange. So I use ropls to run it. The result were different from Cardinal's. Is it a bug or did I configure some parameters incorrectly?
Here's my R script and package version:
library(Cardinal)
library(ropls)
set.seed(2020, kind="L'Ecuyer-CMRG")
mse2 <- simulateImage(preset=7, dim=c(32,32), sdnoise=0.3,
nrun=3, peakdiff=2, centroided=TRUE)
mse2$class <- makeFactor(A=mse2$circleA, B=mse2$circleB)
dat <- mse2[,!is.na(mse2$class)]
#PLS
bbb <- Cardinal::PLS(dat, y=dat$class, ncomp=2)
plot(bbb, type="scores", groups=dat$class, linewidth=2)
aaa<-ropls::opls(t(spectra(dat)),dat$class, orthoI = 0)
plot(aaa)
#OPLS
bbb <- Cardinal::OPLS(dat, y=dat$class, ncomp=2)
plot(bbb, type="scores", groups=dat$class, linewidth=2)
aaa<-ropls::opls(t(spectra(dat)),dat$class, predI = 1, orthoI = NA)
plot(aaa)
Rversion:
platform x86_64-w64-mingw32
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
status
major 4
minor 4.1
year 2024
month 06
day 14
svn rev 86737
language R
version.string R version 4.4.1 (2024-06-14 ucrt)
nickname Race for Your Life
packageversion:
for(i in (.packages())){print(paste0(i,' ',packageVersion(i)))}
[1] "matter 2.6.3"
[1] "Matrix 1.7.0"
[1] "ropls 1.36.0"
[1] "Cardinal 3.6.5"
[1] "S4Vectors 0.42.0"
[1] "stats4 4.4.1"
[1] "BiocParallel 1.38.0"
[1] "BiocGenerics 0.48.1"
[1] "ProtGenerics 1.36.0"
[1] "stats 4.4.1"
[1] "graphics 4.4.1"
[1] "grDevices 4.4.1"
[1] "utils 4.4.1"
[1] "datasets 4.4.1"
[1] "methods 4.4.1"
[1] "base 4.4.1"
Dear Cardinal,
I tried to run opls-da by Cardinal with test data, but the result seems strange. So I use ropls to run it. The result were different from Cardinal's. Is it a bug or did I configure some parameters incorrectly?
Here's my R script and package version:
library(Cardinal)
library(ropls)
set.seed(2020, kind="L'Ecuyer-CMRG")
mse2 <- simulateImage(preset=7, dim=c(32,32), sdnoise=0.3,
nrun=3, peakdiff=2, centroided=TRUE)
mse2$class <- makeFactor(A=mse2$circleA, B=mse2$circleB)
dat <- mse2[,!is.na(mse2$class)]
#PLS
bbb <- Cardinal::PLS(dat, y=dat$class, ncomp=2)
plot(bbb, type="scores", groups=dat$class, linewidth=2)
aaa<-ropls::opls(t(spectra(dat)),dat$class, orthoI = 0)
plot(aaa)
#OPLS
bbb <- Cardinal::OPLS(dat, y=dat$class, ncomp=2)
plot(bbb, type="scores", groups=dat$class, linewidth=2)
aaa<-ropls::opls(t(spectra(dat)),dat$class, predI = 1, orthoI = NA)
plot(aaa)
Rversion:
platform x86_64-w64-mingw32
arch x86_64
os mingw32
crt ucrt
system x86_64, mingw32
status
major 4
minor 4.1
year 2024
month 06
day 14
svn rev 86737
language R
version.string R version 4.4.1 (2024-06-14 ucrt)
nickname Race for Your Life
packageversion: