You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the perf() function on a basic plsda object with nrepeat < 3 yields irregular results. The figure is produced fine as is most of the output components. However, upon calling the $choice.ncomp parameter, the dataframe returned contains NAs for all distances and both error rates.
library(mixOmics)
data(srbct) # extract the small round bull cell tumour dataX<-srbct$gene# use the gene expression data as the X matrixY<-srbct$class# use the class data as the Y matrixinitial.plsda<- plsda(X, Y, ncomp=5)
plsda.perf<- perf(initial.plsda, progressBar=FALSE, auc=TRUE,
folds=3, nrepeat=1)
plot(plsda.perf) # look at the output of the perf function
plsda.perf$choice.ncomp#> max.dist centroids.dist mahalanobis.dist#> overall NA NA NA#> BER NA NA NA
🤔 Expected behavior:
Despite the inability for a t.test to be performed between ncomp values with less than three repeats, for rapid exploration and experimentation with the plsda() function, there should be a work around for this.
💡 Possible solution:
If nrepeat = 1, then just take the minimum value. If nrepeat = 2, take the minimum mean of the two repeat error rates.
The text was updated successfully, but these errors were encountered:
`perf()` now only runs T-test when `nrepeat` >= 3. Notifies user on unreliable results if `nrepeat` < 3. New `test` file for `perf()` functions to maintain coverage
🐞 Describe the bug:
Using the
perf()
function on a basicplsda
object withnrepeat < 3
yields irregular results. The figure is produced fine as is most of the output components. However, upon calling the$choice.ncomp
parameter, the dataframe returned containsNA
s for all distances and both error rates.🔍 reprex results from reproducible example including sessioninfo():
Created on 2022-03-07 by the reprex package (v2.0.1)
Session info
🤔 Expected behavior:
Despite the inability for a
t.test
to be performed betweenncomp
values with less than three repeats, for rapid exploration and experimentation with theplsda()
function, there should be a work around for this.💡 Possible solution:
If
nrepeat = 1
, then just take the minimum value. Ifnrepeat = 2
, take the minimum mean of the two repeat error rates.The text was updated successfully, but these errors were encountered: