遇见数据集

CmdStan-RUS Bilayer Demonstration Files and Code

收藏
Mendeley Data2026-04-18 收录
官方服务:

资源简介:

This repository contains all of necessary input files for the CmdStan-RUS Bilayer code to reproduce the dual-likelihood, optimization plus Laplace approximation fits, of virtual bilayer "VB-4" and experimental bilayer "EB-1" published in: B.R. Goodlet, B. Bales and T.M. Pollock, "A New Elastic Characterization Method for Anisotropic Bilayer Specimens via Bayesian Resonant Ultrasound Spectroscopy", Ultrasonics (2021). The .stan buildfile is highly annotated with: - block and function descriptions - input data for 2 experiments (exp_1 = bare substrate, exp_2 = bilayer specimen) - parameter definitions, bounds, and units - transformed parameters (coordinates) - prior distributions - code for both a "normal" and "log-normal" noise model Datafile-vb4.dat and Datafile-eb1.dat each give the input data for exp_1 and exp_2 - Note: the computational precision for these models, particularly the bilayer model, are set to compute "publish quality" fits that may require 32+ GB of RAM and a runtime in excess of 24 hours. - To test the code on a computer with less RAM, try a low-precision fit using: P_exp1 = 10, and PX_exp2 = 12, PY_exp2 = 12, PZ_sub_exp2 = 1, PZ_coat_exp2 = 0 (and if the fit completes, expect some biased parameter estimates due to insufficient P) - If the code crashes before a single iteration is written to the output.csv file, you may be (i) exceeding the RAM of your computer, or (ii) if you increased the computational precision of the fit, you may be exceeding the computational limits of the code Runfile-vb4.txt and Runfile-eb1.txt each give 3 sets of commands: the first two conduct a optimization (using the LBFGS algorithm) followed by a Laplace approximation, the third conducts a full HMC inference (using the NUTS algorithm) - The first set of commands does not specify initial conditions, so random initial conditions are generated, followed by 1000 optimization iterations and 1000 laplace draws - The second set of commands specifies that "init-vb4.dat" be used for initial conditions, followed by 1000 optimization iterations and 1000 laplace draws - The third set of commands sample the posterior with HMC, using 250 warm-up samples (a bare minimum for successful HMC auto-tuning) followed by 500 sampling samples (from which posterior distributions are computed) - Be advised: HMC sampling of the posterior (as opposed to Laplace approximations of the posterior) can require 10 to 100 times as many forward model evaluations, with "publish quality" fits taking 30+ days of continuous compute time. init-vb4.dat details how initial conditions are specified - Any or all of the parameters (defined in the .stan buildfile) can be specified with initial conditions - Initial conditions for transformed parameters are ignored

本仓库包含复现论文"A New Elastic Characterization Method for Anisotropic Bilayer Specimens via Bayesian Resonant Ultrasound Spectroscopy"(作者B.R. Goodlet、B. Bales与T.M. Pollock,发表于*Ultrasonics* 2021年)中虚拟双层样本"VB-4"与实验双层样本"EB-1"的双似然、优化加拉普拉斯近似(Laplace approximation)拟合结果所需的全部必要输入文件,适配CmdStan-RUS双层代码。 该.stan构建文件附带详尽注释,涵盖以下内容: - 模块与函数说明 - 两项实验的输入数据(exp_1为裸基底,exp_2为双层试样) - 参数定义、取值范围与单位 - 变换后参数(坐标) - 先验分布 - 对应"正态"与"对数正态"噪声模型的代码 Datafile-vb4.dat与Datafile-eb1.dat分别提供了exp_1与exp_2的输入数据。 - 注:本模型(尤其是双层模型)的计算精度被设置为可生成"可发表级"拟合结果,该配置可能需要32GB以上的运行内存,且耗时超过24小时。 - 若要在内存容量较低的计算机上测试代码,可尝试使用低精度拟合:设置P_exp1 = 10,PX_exp2 = 12,PY_exp2 = 12,PZ_sub_exp2 = 1,PZ_coat_exp2 = 0(若拟合完成,由于P值不足,参数估计可能存在一定偏差) - 若代码在向output.csv文件写入首个迭代结果前崩溃,可能存在两种情况:(i) 超出了当前计算机的内存上限;(ii) 若你提高了拟合的计算精度,则可能超出了代码的计算极限。 Runfile-vb4.txt与Runfile-eb1.txt各包含三组命令: - 第一组命令未指定初始条件,因此会自动生成随机初始条件,随后使用有限内存BFGS算法(LBFGS)执行1000次优化迭代,并完成1000次拉普拉斯抽样 - 第二组命令指定使用init-vb4.dat作为初始条件,随后使用有限内存BFGS算法(LBFGS)执行1000次优化迭代,并完成1000次拉普拉斯抽样 - 第三组命令使用哈密顿蒙特卡洛(Hamiltonian Monte Carlo, HMC)方法对后验分布进行完整推断,采用无回旋采样器(No-U-Turn Sampler, NUTS)算法,其中包含250次预热迭代(成功实现HMC自动调优的最低要求),随后执行500次抽样迭代(用于计算后验分布) - 请注意:相较于后验的拉普拉斯近似,使用HMC采样后验分布可能需要10至100倍的前向模型评估次数,可发表级拟合的连续计算耗时可达30天以上。 init-vb4.dat详细说明了初始条件的指定方式: - 可使用初始条件指定.stan构建文件中定义的任意或全部参数 - 变换后参数的初始条件将被忽略。

创建时间:
2021-02-12
二维码
社区交流群
二维码
科研交流群
商业服务