← Back to all sparks
M

mdatools

INFRA · APIS
Velocity0.0

Multivariate Data Analysis for Chemometrics

mdatools spun out its cross-validation method, then came back for three-way data.

chemometricsspectroscopyclassificationmultiway-analysiscross-validationr-packages
Current state
mdatools is a long-running chemometrics package covering PCA, PLS regression, SIMCA and DD-SIMCA classification, MCR resolution and a large spectral preprocessing framework. Its releases are infrequent and each one tends to carry one substantive idea plus a handful of fixes. The June release opens a direction the package had not previously taken: DD-SIMCA classification of three-way data, through PARAFAC and Tucker decompositions.
Where it's heading
The shape of the package has been managed deliberately rather than allowed to sprawl. Procrustes cross-validation grew large enough to warrant its own package and was moved out to pcv in 0.14.0; preprocessing was consolidated in 0.12.0 into a composable prep() framework rather than a set of loose functions. Around that, the recurring work is numerical: a more stable SIMPLS implementation, cross-validation rewritten to accept user-supplied segment indices, prep.savgol() and prep.alsbasecorr() rewritten for speed, and now the baseline iteration default raised to match the web applications the maintainer also runs.
Prediction
Three-way DD-SIMCA arrives with two decompositions and no companion regression or resolution methods for multiway data, so extending the multiway path to the rest of the toolkit is the obvious follow-up. The alignment of defaults with the maintainer's web applications suggests those two codebases will keep being reconciled.

Recent moves

  1. 1mo ago

    DD-SIMCA classification arrives for three-way data

    ⚡ SPARK

    The package's methods have always assumed a two-way data matrix. This release adds classification for three-way arrays, which is a different kind of input rather than another method over the same input, and it does so through the two standard multiway decompositions rather than one.

    View source ↗
  2. 5mo ago

    v. 0.15.0

    A pointer entry claiming improvements, fixes and new functionality without naming any of them, and directing readers to full release notes elsewhere. What 0.15.0 contains cannot be read from the feed.

    View source ↗
  3. 2y ago

    Data frames converted to matrices automatically for model training

    Small ergonomics and defensiveness: preprocessing methods gain sanity checks because most only work correctly on matrices, and model-training methods now convert a data frame themselves rather than failing obscurely. Plus one reported bug fixed.

    View source ↗
  4. 3y ago

    cv.scope lets centering and scaling follow the global or local set

    Adds explicit control over a choice that was previously implicit: whether cross-validation folds center and scale using globally computed statistics or their own local calibration set. The default keeps the existing local behaviour, so results do not move unless you ask them to — a careful handling of a parameter that changes reported performance.

    View source ↗
  5. 3y ago

    Procrustes cross-validation moves out to its own pcv package

    ⚡ SPARK

    A deliberate narrowing rather than an addition: pcv() had outgrown its host and was moved to a dedicated package, with mdatools' documentation chapter rewritten to point outward. The Venetian-blinds index bug fixed alongside it changed segment assignment for regression, where indices are generated against the order of response values.

    View source ↗
  6. 3y ago

    getRegcoeffs() fixed for unscaled models; ipls() gains a full mode

    A correctness fix worth noting — regression coefficients were wrong for models built without centering or scaling — plus an ipls() option to keep iterating past the point where no improvement is seen, which the release note itself flags as something to use carefully.

    View source ↗