Skip to content

The official code repository for "Optimal Spectroscopic Measurement Design: Bayesian Framework for Rational Data Acquisition," Machine Learning: Science and Technology 6, 025037 (2025).

Notifications You must be signed in to change notification settings

quantumbeam/OptimalSpectroscopicMeasurementDesign

Repository files navigation

Optimal spectroscopic measurement design: Bayesian framework for rational data acquisition

Yusei Ito, Yasuo Takeichi, Hideitsu Hino and Kanta Ono

Machine Learning: Science and Technology 6, 025037 (2025). https://doi.org/10.1088/2632-2153/add0f6

Citation

@article{ito2025experimentaldesign,
  year      = {2025},
  title     = {Optimal spectroscopic measurement design: Bayesian framework for rational data acquisition},
  author    = {Yusei Ito and 
               Yasuo Takeichi and
               Hideitsu Hino and
               Kanta Ono},
  journal   = {Machine Learning: Science and Technology}, 
  doi       = {10.1088/2632-2153/add0f6}, 
  volume    = {6},
  number    = {2}, 
  pages     = {025037}
}

Reproduce the result of our paper

Run the following command:

python CutoffOptimization.py
python MakeCovarianceMatrix.py
julia GetOptimalPoints_SquaredLoss.jl
julia GetOptimalPoints_KLDivergence.jl
python BiasVarianceDecomposition.py

Steps of our proposed method

For fast processing, we implemented the part of optimal measurement points in Julia.

Others are implemented in Python

  1. Calculate the parameter $c$ in the covariance matrix of a prior distribution. The implementation is in CutoffOptimization.py

  2. Get prior distribution The implementation is in the MakeCovarianceMatrix.py

  3. Get optimal measurement points The implementation is in the GetOptimalPoints.jl

  4. Calculate minimal measurement points by bias-variance decomposition. The implementation is in the BiasVarianceDecomposition.py

Details of each step are provided in the following sections.


How to calculate the parameter $c$

For XAS application provided in our paper, just run

python CutoffOptimization.py

If you want to try your own measurement, load the standard data and arrange the noise function.


Get prior distribution

For the XAS application, we take into account the background that is specific to the XAS problem.

To reproduce our results provided in the paper, run

python MakeCovarianceMatrix.py

For your own application, please comment out the part of the background.

Get optimal measurement points

You can decide the following parameters:

  • reg_energy: All of the discritized points, which is the candidate of the measurement points.
  • initial_sampling_num: Number of initial measurement points.
  • SamplingNum: The total number of measurement points.

Run

julia GetOptimalPoints_SquaredLoss.jl
julia GetOptimalPoints_KLDivergence.jl

then you can get optimal measurement points.

Bias-variance decomposition

Run

python BiasVarianceDecomposition.py

Make sure that you need to use same covariance matrix and candidate measurement points as the part of obtaining the optimal measurement points.

About

The official code repository for "Optimal Spectroscopic Measurement Design: Bayesian Framework for Rational Data Acquisition," Machine Learning: Science and Technology 6, 025037 (2025).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published