CRaFT: A Conditional Random Fields Toolbox for Matlab
Conditional random fields (CRFs) provide a powerful framework for modeling spatial variability while enforcing consistency with measured data, and are essential for uncertainty analysis across a wide range of engineering applications. However, classical CRF simulation methods often face prohibitive computational costs and limited scalability. To overcome these challenges, we present CRaFT, a Matlab-based toolbox that delivers an efficient, accurate and user-friendly framework for CRF simulation. CRaFT integrates three key components into a streamlined workflow: Kriging interpolation to estimate the mean field and ensure exact reproduction of observations, Nyström approximation to efficiently construct interpolated covariance matrices that strictly eliminate variance at measurement locations, and Karhunen–Loève expansion applied to conditional covariance matrices to generate random realizations that capture spatial variability with high fidelity. This framework requires only a single covariance decomposition, achieving significant computational savings without compromising accuracy. CRaFT is problem-agnostic, dimension-independent and highly flexible, enabling users to specify covariance models, correlation structures and random field properties tailored to diverse applications. Numerical tests confirm its ability to preserve spatial correlations and reproduce measured data exactly. By bridging theoretical advances and practical implementation, CRaFT establishes a scalable and versatile solution for CRF simulation in modern engineering practice.
Authors
- Zhibao Zheng (ORCID: https://orcid.org/0000-0003-4189-8817)
Institutions
- Leibniz University Hannover (DE)
Publication Details
- Journal
- SoftwareX
- Published
- 2025-10-15
- DOI
- https://doi.org/10.1016/j.softx.2025.102406
- Primary Topic
- Probabilistic and Robust Engineering Design
- Type
- article
- Field-Weighted Citation Impact
- 0.00