mixOmicsTeam / mixOmics

Development repository for the Bioconductor package 'mixOmics '
http://mixomics.org/
157 stars 52 forks source link

Fix for Issue #266 #267

Closed Max-Bladen closed 1 year ago

Max-Bladen commented 1 year ago

While the error that resulted in this PR was raised by auroc(), the issue stems from the predict() function.

Lack of more explicit warning against near zero variance features in block.splsda() will be address in separate PR.

For framework presented in reprex in associated GitHub Issue (here).

Take a given feature in one of the predictor blocks. If it's all 0s:

If that feature are all the same non-zero value (eg. all equal to 1):

Hence, when the newdata parameter is centered and scaled using attributes of object$X, function now checks if any of the values are not finite. If so, then Inf or -Inf are replaced by NaN