l-ramirez-lopez / resemble

resemble is an R package which implements functions dedicated to non-linear modelling of complex spectroscopy data
Other
20 stars 14 forks source link

Inconsistent score names between ortho_projection and predict (pls method) #49

Closed zecojls closed 9 months ago

zecojls commented 10 months ago

Hi Leo,

I think this is just a small fix...

When I compress a matrix of spectra using 'pls' method...

ortho_projection(Xr = pls.data, Xu = NULL, Yr = target, method = "pls", pc_selection = list(method = "manual", value = 3))

The scores matrix from this object are column-named pls_1, pls_2, and pls_3.

If I predict new spectra with this trained model, the scores column names are pls1, pls2, and pls2, requiring that I rename it within the pipeline for plotting or analyzing both datasets in conjunction.

This does not happen for method pca.

Thanks

l-ramirez-lopez commented 9 months ago

Thanks Jose this has been fixed and will go into the next version