waves 0.2.6
This release focuses on performance improvements, bug fixes, and enhanced compatibility.
Bug fixes
- Fixed
plot_spectra()no longer returns an error whendetect.outliersis set toFALSEand no alternative title is provided via thealternate.titleparameter (#29). - Fixed compatibility issue with updated
spectaclespackage (v0.5.5) that was causing data frame construction errors in model performance calculations. - Resolved temporary CRAN archive issue with the dependency
spectacles(#31).
Performance improvements
- Optimized cross-validation loops in
train_spectra()using vectorized indexing and preallocated result structures. - Optimized matrix operations in
train_spectra()for faster column selection and reduced memory overhead. - Added shared utility functions to eliminate code duplication between
train_spectra()andtest_spectra().
Internal code improvements:
- Significantly refactored
train_spectra()andtest_spectra()to reduce cyclomatic complexity (#26).train_spectra()complexity reduced from 32+ to 25test_spectra()complexity reduced to 11
- Enhanced error handling for spectacles package compatibility
- Improved code maintainability through function decomposition
Other changes
- When
return.distances = TRUE, the h.distance column is now located between metadata and spectra in the returneddata.frame.
This version is now available on CRAN!