MParT
Version 2.2.2 (1.69 MB) by
Paul-Baptiste Rubio
Monotone Parameterization Toolkit (MParT): A core library for constructing and using transport maps.
MParT: A Monotone Parameterization Toolkit
A CPU/GPU performance-portable library for parameterizing and constructing monotone functions in the context of measure transport and regression.
Documentation
Installation
MParT uses a C++ core that needs Kokkos and Eigen directly as dependencies and Catch2 as a test dependency. MParT uses CMake to handle dependencies and compiler configurations. A basic build of MParT that should work on most operating systems can be obtained by running this in the MParT folder:
mkdir build
cd build
cmake \
-DCMAKE_INSTALL_PREFIX=<your/MParT/install/path> \
-DKokkos_ENABLE_PTHREAD=ON \
-DKokkos_ENABLE_SERIAL=ON \
..
make install
Usage
Once MParT is installed a simple usage to create a monotone component from a custom multi-index set is:
% Add path to the MParT installation folder
addpath(genpath('<your/MParT/install/path>'))
% Set number of threads used by KoKKos
num_threads = 8;
KokkosInitialize(num_threads);
% Create multi-index set in 2D
multis = [0,1;2,0;1,1];
mset = MultiIndexSet(multis);
fixedSet = mset.Fix();
% Create monotone component
opts = MapOptions();
mapComponent = CreateComponent(fixedSet,opts);
% Set coefficients
nc = mapComponent.numCoeffs;
mapComponent.SetCoeffs(ones(1,nc));
% Evaluate map at 10 random points
mapComponent.Evaluate(randn(2,10));
Tutorials
Many tutorials and examples using MParT are available on the Matlab folder of the MParT-examples repo. Examples include:
- Monotone regression
- Density estimation
- Bayesian inference
Running these examples will require the following matlab toolboxes:
- Statistics and Machine Learning Toolbox
- Optimization Toolbox
Cite As
MParT Development Team. [year]. MParT: A Monotone Parameterization Toolkit, https://measuretransport.github.io/MParT/[version]
MATLAB Release Compatibility
Created with
R2021b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
bindings/matlab/mat
bindings/matlab/mat/MapOptions
bindings/matlab/tests
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.