svkucheryavski / mdatools

R package for Multivariate Data Analysis
https://mda.tools
Other
33 stars 11 forks source link

Singular matrix problem in PLS #86

Closed svkucheryavski closed 4 years ago

svkucheryavski commented 4 years ago

In some cases when user does not limit number of PLS components manually, PLS results in following error message:

Error in crossval.regmodel(model, x, y, cv, cal.fun = pls.cal) : 
In addition: Warning message:
In sqrt(as.numeric(c)) : NaNs produced

The problem most probably is related to singular matrix problem in SIMPLS algorithm in one of the cross-validation step. Check if number of components is adjusted correctly in cross-validation.