Skip to content

Commit

Permalink
fixed an issue in simpls implementation which lead to wrong check res…
Browse files Browse the repository at this point in the history
…ults on M1
  • Loading branch information
svkucheryavski committed Apr 26, 2021
1 parent 49de1c8 commit 0b897e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/pls.R
Original file line number Diff line number Diff line change
Expand Up @@ -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). "
Expand Down

0 comments on commit 0b897e7

Please sign in to comment.