Package: riemtan 0.2.5

Nicolas Escobar

riemtan: Riemannian Metrics for Symmetric Positive Definite Matrices

Implements various Riemannian metrics for symmetric positive definite matrices, including AIRM (Affine Invariant Riemannian Metric, <doi:10.1007/s11263-005-3222-z>), Log-Euclidean (<doi:10.1002/mrm.20965>), Euclidean, Log-Cholesky (<doi:10.1137/18M1221084>), and Bures-Wasserstein metrics (<doi:10.1016/j.exmath.2018.01.002>). Provides functions for computing logarithmic and exponential maps, vectorization, and statistical operations on the manifold of positive definite matrices.

Authors:Nicolas Escobar [aut, cre], Jaroslaw Harezlak [ths]

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

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

Bug tracker:https://github.com/nicoesve/riemtan/issues

Pkgdown/docs site:https://nicoesve.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • airm - Pre-configured Riemannian metrics for SPD matrices
  • bures_wasserstein - Pre-configured Riemannian metrics for SPD matrices
  • euclidean - Pre-configured Riemannian metrics for SPD matrices
  • log_cholesky - Pre-configured Riemannian metrics for SPD matrices
  • log_euclidean - Pre-configured Riemannian metrics for SPD matrices

On CRAN:

Conda:

cpp

5.14 score 13 scripts 293 downloads 56 exports 29 dependencies

Last updated from:1f0276cc0a. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK246
linux-devel-x86_64OK211
source / vignettesOK302
linux-release-arm64OK243
linux-release-x86_64OK228
macos-release-arm64OK213
macos-release-x86_64OK435
macos-oldrel-arm64OK238
macos-oldrel-x86_64OK280
windows-develOK250
windows-releaseOK286
windows-oldrelOK209
wasm-releaseOK159

Exports:airm_expairm_logairm_unvecairm_vecbures_wasserstein_expbures_wasserstein_logbures_wasserstein_unvecbures_wasserstein_veccompute_frechet_meanconfigure_progresscreate_parquet_backendCSampleCSuperSampledefault_ref_ptdexpdlogeuclidean_expeuclidean_logeuclidean_unveceuclidean_vecget_n_workershalf_underscoreis_parallel_enabledis_progress_availableListBackendlog_cholesky_explog_cholesky_loglog_cholesky_unveclog_cholesky_veclog_euclidean_explog_euclidean_loglog_euclidean_unveclog_euclidean_vecmetricParquetBackendrelocatereset_parallel_planrspdnormsafe_logmset_parallel_planshould_parallelizespd_isometry_from_identityspd_isometry_to_identityvalidate_backendvalidate_connsvalidate_exp_argsvalidate_log_argsvalidate_metricvalidate_parquet_dirvalidate_parquet_directoryvalidate_tan_imgsvalidate_unvec_argsvalidate_vec_argsvalidate_vec_imgsvec_at_idwrite_connectomes_to_parquet

Dependencies:arrowassertthatbitbit64clicodetoolscpp11digestfurrrfutureglobalsgluejsonlitelatticelifecyclelistenvmagrittrMASSMatrixmatrixStatsparallellypurrrR6RcppRcppEigenrlangtidyselectvctrswithr

Performance Benchmarking and Optimization
Introduction | Parallel Processing Overview | Setup | Benchmarking Parallel vs Sequential | Tangent Computations | Frechet Mean Computation | Parquet I/O Benchmarks | Scaling Analysis | Worker Count Scaling | Dataset Size Impact | Optimization Guidelines | When to Use Parallel Processing | Optimal Worker Count | Memory Optimization | Progress Reporting Overhead | Benchmarking Best Practices | 1. Use microbenchmark for Accurate Measurements | 2. Control for Caching Effects | 3. Report System Information | Common Performance Patterns | Pattern 1: Compute-Bound Operations | Pattern 2: Iteration-Heavy Operations | Pattern 3: I/O-Bound Operations | Platform-Specific Notes | Windows | Mac/Linux | HPC Clusters | Summary

Last update: 2025-11-10
Started: 2025-11-10

Using Parquet Storage for Large Datasets
Introduction | Benefits of Parquet Storage | Installation | Basic Workflow | 1. Writing Connectomes to Parquet | 2. Validating Parquet Directory | 3. Creating a CSample with Parquet Backend | 4. Computing with Parquet-backed CSample | 5. Lazy Loading Behavior | Working with CSuperSample | Backwards Compatibility | Performance Tips | Cache Size Tuning | Batch Operations | Parallel Processing with Parquet | Enabling Parallel Processing | Parallel I/O and Computation | Batch Loading with Parallel I/O | Performance Comparison | Progress Reporting | Best Practices | Auto-Detection | Parallel Strategies | Metadata Access | Advanced: Custom File Patterns | Troubleshooting | Large Datasets | Memory Monitoring | Summary

Last update: 2025-11-10
Started: 2025-11-10

riemtan: Statistical Analysis of Connectomes using Riemannian Geometry
Introduction | Key Features | Installation | Basic Usage | Loading the Package and Setting Up | Working with Metrics | Creating and Manipulating Samples | Creating Random Samples | Computing Different Representations | Statistical Analysis | Computing the Fréchet Mean | Computing Sample Statistics | Advanced Examples | Discriminating Between Two Samples | Working with Real Data | Key Classes | CSample Class | Metric Objects | Performance Considerations | References

Last update: 2025-04-06
Started: 2025-04-06

Readme and manuals

Help Manual

Help pageTopics
Compute the AIRM Exponentialairm_exp
Compute the AIRM Logarithmairm_log
Compute the Inverse Vectorization (AIRM)airm_unvec
Compute the AIRM Vectorization of Tangent Spaceairm_vec
Compute the Bures-Wasserstein Exponentialbures_wasserstein_exp
Compute the Bures-Wasserstein Logarithmbures_wasserstein_log
Compute the Bures-Wasserstein Inverse Vectorizationbures_wasserstein_unvec
Compute the Bures-Wasserstein Vectorizationbures_wasserstein_vec
Compute the Frechet Meancompute_frechet_mean
Configure Progress Handlersconfigure_progress
Create ParquetBackend from Directorycreate_parquet_backend
CSample ClassCSample
CSuperSample ClassCSuperSample
Default reference pointdefault_ref_pt
Differential of Matrix Exponential Mapdexp
Differential of Matrix Logarithm Mapdlog
Compute the Euclidean Exponentialeuclidean_exp
Compute the Euclidean Logarithmeuclidean_log
Compute the Inverse Vectorization (Euclidean)euclidean_unvec
Vectorize at Identity Matrix (Euclidean)euclidean_vec
Get Current Number of Parallel Workersget_n_workers
Half-underscore operation for use in the log-Cholesky metrichalf_underscore
Create an Identity Matrixid_matr
Check if Parallel Processing is Enabledis_parallel_enabled
Check if Progress Reporting is Availableis_progress_available
ListBackend ClassListBackend
Compute the Log-Cholesky Exponentiallog_cholesky_exp
Compute the Log-Cholesky Logarithmlog_cholesky_log
Compute the Log-Cholesky Inverse Vectorizationlog_cholesky_unvec
Compute the Log-Cholesky Vectorizationlog_cholesky_vec
Compute the Log-Euclidean Exponentiallog_euclidean_exp
Compute the Log-Euclidean Logarithmlog_euclidean_log
Compute the Inverse Vectorization (Euclidean)log_euclidean_unvec
Vectorize at Identity Matrix (Euclidean)log_euclidean_vec
Metric Object Constructormetric
Pre-configured Riemannian metrics for SPD matricesairm bures_wasserstein euclidean log_cholesky log_euclidean metrics
Parallel Processing Configuration for riemtanparallel_config
ParquetBackend ClassParquetBackend
Progress Reporting Utilities for riemtanprogress_utils
Relocate Tangent Representations to a New Reference Pointrelocate
Reset Parallel Plan to Sequentialreset_parallel_plan
Generate Random Samples from a Riemannian Normal Distributionrspdnorm
Wrapper for the matrix logarithmsafe_logm
Set Parallel Processing Planset_parallel_plan
Decide Whether to Use Parallel Processingshould_parallelize
Reverse isometry from tangent space at identity to tangent space at Pspd_isometry_from_identity
Isometry from tangent space at P to tangent space at identityspd_isometry_to_identity
TangentImageHandler ClassTangentImageHandler
Validate Backend Objectvalidate_backend
Validate Connectionsvalidate_conns
Validate arguments for Riemannian logarithmsvalidate_exp_args
Validate arguments for Riemannian logarithmsvalidate_log_args
Validate Metricvalidate_metric
Validate Parquet Directory Structurevalidate_parquet_dir
Validate Parquet Directoryvalidate_parquet_directory
Validate Tangent Imagesvalidate_tan_imgs
Validate arguments for inverse vectorizationvalidate_unvec_args
Validate arguments for vectorizationvalidate_vec_args
Validate Vector Imagesvalidate_vec_imgs
Vectorize at Identity Matrixvec_at_id
Write Connectomes to Parquet Fileswrite_connectomes_to_parquet