Skip to main content

Functions to perform calibration transfer by likelihood maximization: a standard-free approach capable of handling non-overlapping wavelength ranges.

In this approach, calibration for spectral data on primary instrument is performed by likelihood maximization inverse regression (LMIR).
Based on a limited number of spectra from a secondary instrument and the corresponding reference values, an estimation model is created based on block pairs.
The latter can then be used to estimate spectra from secondary instrument in the domain of primary instrument to be able to use to primary calibration.

Cf: F.B. Lavoie, A. Langlet, K. Muteki, R. Gosselin, Likelihood Maximization Inverse Regression: A novel non-linear multivariate model, Chemom. Intell. Lab. Syst. 194 (2019) 103844. https://doi.org/10.1016/j.chemolab.2019.103844.

F.B. Lavoie, G. Robert, A. Langlet, R. Gosselin, Calibration transfer by likelihood maximization : A standard-free approach capable of handling non-overlapping wavelength ranges, Chemom. Intell. Lab. Syst. 234 (2023) 104766. https://doi.org/10.1016/j.chemolab.2023.104766.

Call function

model, ypred = LMIR_create(X1,Y1,linear=True)

R1_all, g1_all, R2_all, g2_all = estimation_model(X1, Y1, X2c, Y2c,factor_k,nb_pairs=30,B)

ypred_ct, x1hat_ct, covx1_ct = estimation_exploit(R1_all,g1_all,R2_all,g2_all,X2v,X1,model)

Input arguments

  1. X1 (n1,k1): spectral data from primary instrument
  2. Y1 (n1,1): reference values for spectra from primary instrument
  3. X2c (n2,k2): spectral data from secondary instrument
  4. Y2c (n2,1): reference values for spectra from secondary instrument
  5. factor_k: parameter for supervised selection of observations for estimation model
  6. X2v: spectral data from secondary instrument for validation

Optional input arguments

  1. linear: option to create linear or non-linear models linking y to each varibale in X for LMIR modeling (default_value=True for linear modeling)
  2. nb_pairs: number of block pairs in estimation model (default_value=30)
  3. B: number of variable bootstrapping trials (default_value=3*max(k1,k2))

Outputs

  1. model: model created by LMIR
  2. ypred: predicted values by LMIR
  3. R1_all, g1_all, R2_all, g2_all: blocks pairs in estimation model
  4. ypred_ct: predicted values using estimation model and LMIR model from spectra from secondary instrument
  5. x1hat_ct: estimated spectra in domain of primary instrument
  6. covx1_ct: uncertainty associated to estimation of spectra in domain of primary instrument

Examples

Two full examples, along with datasets are provided in folder 'tests' of 'Download Files'.

  • Example 1: Tablet shootout dataset
  • Example 2: Coating times dataset
  • Example 3: Wheat shootout dataset

Compatibility

transfer_lmir tested on Python 3.8 using the following modules:

  • numpy 1.20.1
  • matplotlib 3.3.4
  • SciPy 1.6.2

Release files for transfer-lmir 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for transfer-lmir 0.0.7
File Size Uploaded
transfer_lmir-0.0.7.tar.gz 9.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for transfer-lmir 0.0.7
File Interpreter ABI Platform
transfer_lmir-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 MB

Release files / transfer_lmir-0.0.7.tar.gz

Download URL transfer_lmir-0.0.7.tar.gz
Size 9.5 MB
Tags Source
SHA-256 checksum
How to use checksums
d87618e6ccb8ded69648951f92dae1d72d5c449699d61f81d395eef21cbbadb0
BLAKE2b-256 checksum
How to use checksums
5c2be995c53487b51ad2aa01a80a1276fee37469cbb8a8e1267ab121862b328d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / transfer_lmir-0.0.7-py3-none-any.whl

Download URL transfer_lmir-0.0.7-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e10797be763aa5385206f79b9619d6f2025659e562a45284946abc454099afb
BLAKE2b-256 checksum
How to use checksums
a678687ed2176afabb511fde7bd9943c1b1602315c1fd9909ad7ccc94600ce8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page