Package: resemble 3.0.1

resemble: Similarity Retrieval and Local Learning for Spectral Chemometrics

Functions for dissimilarity analysis and machine learning in complex spectral data sets, including memory-based learning (MBL), optimal subset search and selection, and retrieval-based modelling with model libraries. Supports local learning, optimisation of spectral libraries, and ensemble prediction from precomputed models. Most of these functions are based on the methods presented in Ramirez-Lopez et al. (2013) <doi:10.1016/j.geoderma.2012.12.014>.

Authors:Leonardo Ramirez-Lopez [aut, cre], Antoine Stevens [aut, ctb], Claudio Orellano [ctb]

resemble_3.0.1.tar.gz
resemble_3.0.1.zip(r-4.7-x86_64)resemble_3.0.1.zip(r-4.6-x86_64)resemble_3.0.1.zip(r-4.5-x86_64)
resemble_3.0.1.tgz(r-4.6-x86_64)resemble_3.0.1.tgz(r-4.6-arm64)resemble_3.0.1.tgz(r-4.5-x86_64)resemble_3.0.1.tgz(r-4.5-arm64)
resemble_3.0.1.tar.gz(r-4.7-arm64)resemble_3.0.1.tar.gz(r-4.7-x86_64)resemble_3.0.1.tar.gz(r-4.6-arm64)resemble_3.0.1.tar.gz(r-4.6-x86_64)
resemble_3.0.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
resemble/json (API)

# Install 'resemble' in R:
install.packages('resemble', repos = c('https://l-ramirez-lopez.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/l-ramirez-lopez/resemble/issues

Pkgdown/docs site:https://l-ramirez-lopez.github.io

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

Conda:

cheminformaticschemometricsevolutionary-algorithmevolutionary-searchinfrared-spectroscopylazy-learninglocal-regressionmachine-learningmemory-based-learningnirpedometricssoil-spectroscopyspectral-dataspectral-libraryspectroscopyquartoopenblascppopenmp

7.93 score 28 stars 64 scripts 487 downloads 30 exports 10 dependencies

Last updated from:d98c1c0c5a. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK209
linux-devel-x86_64OK185
source / vignettesOK380
linux-release-arm64OK186
linux-release-x86_64OK190
macos-release-arm64OK276
macos-release-x86_64OK348
macos-oldrel-arm64OK205
macos-oldrel-x86_64OK284
windows-develOK217
windows-releaseOK216
windows-oldrelOK213
wasm-releaseOK127

Exports:diss_correlationdiss_cosinediss_euclideandiss_evaluatediss_mahalanobisdiss_pcadiss_plsdissimilarityfit_gprfit_plsfit_waplsgesearchgesearch_controlget_predictionsliblexliblex_controlmblmbl_controlmodelmodel_controlncomp_by_cumvarncomp_by_opcncomp_by_varncomp_fixedneighbors_dissneighbors_kortho_projectionsearch_neighborssidsim_eval

Dependencies:clicodetoolsforeachiteratorslifecyclemathjaxrRcppRcppArmadilloRhpcBLASctlrlang

2 Dimensionality reduction of spectral data
Introduction | Methods available in the resemble package | Selecting the number of components | Variance-based selection | Individual variance threshold (ncomp_by_var()) | Cumulative variance threshold (ncomp_by_cumvar()) | Optimal component selection (ncomp_by_opc()) | Fixed number of components | Dimentionality reduction methods in ortho_projection() | Available methods | Example: PCA projection | Example: PLS projection | Example: Optimal component selection | Projecting new data | Multivariate side information | References

Last update: 2026-04-21
Started: 2026-04-21

1 Essential concepts and setup
Introduction | Citing the package | Dataset used across the vignettes | Spectral preprocessing | References

Last update: 2026-04-21
Started: 2026-04-21

3 Estimating dissimilarity between spectra
Introduction | Main notation | Available dissimilarity construtors | Dissimilarity in orthogonal projection spaces | PCA-based dissimilarity | PLS-based dissimilarity | Correlation dissimilarity | Conventional correlation dissimilarity | Moving window correlation dissimilarity | Parallel execution for correlation-based dissimilarity (advanced users) | Euclidean dissimilarity | Cosine dissimilarity | Evaluating dissimilarity methods | References

Last update: 2026-04-21
Started: 2026-04-21

4 Nearest-neighbor search
Searching for neighbors | Neighbor selection methods | Fixed-$k$ selection | Dissimilarity-threshold selection | Using a specific number of neighbors | Using a dissimilarity threshold | Spiking the neighborhoods

Last update: 2026-04-21
Started: 2026-04-21

5 Simple global models
Introduction | Fitting methods | Example | Data preparation | Fitting a PLS model | Fitting a GPR model | Prediction | Validation statistics | References

Last update: 2026-04-21
Started: 2026-04-21

6 Classical memory-based learning (local modelling)
Memory-based learning | Fitting methods and constructors | The mbl_control() function and validation types | Model fitting and prediction | Additional examples | Using Yu argument | Supported parallel processing | References

Last update: 2026-04-21
Started: 2026-04-21

7 Evolutionary subset search using gesearch
Introduction | Glossary and conventions | The gesearch algorithm: How it works | Evolutionary search overview | Weakness score computation | Step 1: Evaluate each individual | Step 2: Aggregate to gene-level weakness | Interpretation | Weakness functions | Gene silencing | Final model | Key parameters | Practical considerations | Example workflow | The dataset, the target set, and its practical constraints | A simple linear model for predicting in the target set (baseline) | The model built with the samples found by gesearch | Further examples of gesearch | No response values available for the target set | No response values in the target set but with information about the response range | Supported parallel processing | References

Last update: 2026-04-21
Started: 2026-04-21

8 Building a library of models with liblex
Introduction | How liblex works | Build phase | Prediction phase | Data preparation | Core components | Neighbor selection | Dissimilarity methods | Fitting method | Control parameters | Building a library of models | Using fixed neighborhood size(s) | Using dissimilarity thresholds | Visualizing neighborhood centroids | Visualizing the regression models | Choosing anchor samples | Using k-means sampling | Building the library with selected anchors | Prediction | Prediction output | Weighting options | Enforcing specific experts | Validation and performance | Evaluation metrics | Uncertainty as a quality filter | Visualization | Comparison with classical MBL | Parallel processing | Summary | References

Last update: 2026-04-21
Started: 2026-04-21

Readme and manuals

Help Manual

Help pageTopics
Overview of the functions in the resemble packageresemble-package resemble
Correlation dissimilarity method constructordiss_correlation
Cosine dissimilarity method constructordiss_cosine
Euclidean dissimilarity method constructordiss_euclidean
Evaluate dissimilarity matricesdiss_evaluate sim_eval
Mahalanobis dissimilarity method constructordiss_mahalanobis
PCA dissimilarity method constructordiss_pca
PLS dissimilarity method constructordiss_pls
Compute dissimilarity matricesdissimilarity
Local fitting method constructorsfit_gpr fit_methods fit_pls fit_wapls
Evolutionary sample search for context-specific calibrationsgesearch gesearch.default gesearch.formula plot.gesearch predict.gesearch
Control parameters for gesearchgesearch_control
Build a precomputed library of localised experts using memory-based learningliblex plot.liblex predict.liblex
Control parameters for liblexliblex_control
Memory-based learning (mbl)get_predictions mbl plot.mbl
Control parameters for memory-based learningmbl_control
Global spectral calibration modelmodel predict.resemble_model
Control parameters for global model fittingmodel_control
Component selection methodsncomp_by_cumvar ncomp_by_opc ncomp_by_var ncomp_fixed ncomp_selection
Neighbor selection methodsneighbors neighbors_diss neighbors_k
Orthogonal projectionsortho_projection plot.ortho_projection predict.ortho_projection
Search neighbors in a reference setsearch_neighbors
A function for computing the spectral information divergence between spectra (sid)sid