Skip to content

waves 0.2.6

Latest

Choose a tag to compare

@jmh579 jmh579 released this 31 Oct 15:18
· 1 commit to main since this release

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 when detect.outliers is set to FALSE and no alternative title is provided via the alternate.title parameter (#29).
  • Fixed compatibility issue with updated spectacles package (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() and test_spectra().

Internal code improvements:

  • Significantly refactored train_spectra() and test_spectra() to reduce cyclomatic complexity (#26).
    • train_spectra() complexity reduced from 32+ to 25
    • test_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 returned data.frame.

This version is now available on CRAN!