From 0b897e72d68a61b847052e7f60a3c4de7d891f9e Mon Sep 17 00:00:00 2001 From: Sergey Kucheryavskiy Date: Mon, 26 Apr 2021 13:13:43 +0200 Subject: [PATCH] fixed an issue in simpls implementation which lead to wrong check results on M1 --- R/pls.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/pls.R b/R/pls.R index d3abfab..c185a84 100755 --- a/R/pls.R +++ b/R/pls.R @@ -1497,7 +1497,7 @@ pls.simpls <- function(x, y, ncomp, cv = FALSE) { c <- as.numeric(crossprod(w, (M %*% w))) # stop cycle since c-value is very small and can result in singular matrix - if (c < .Machine$longdouble.eps) { + if (c < .Machine$double.eps) { n <- n - 1 warning(paste0( "PLS can not compute more than ", n, " components (eigenvalues are too small). "