NESolver: A Chemistry-Informed Tool for Multivariate Ion Analysis with Ion- Selective Electrodes
Weixun Luo, Martyn G. Boutelle
Abstract
Background and Objective: The vulnerability to cross-ion interference has impeded the practical application of ion-selective electrodes. Such cross- selectivity is difficult to model and has yet to be fundamentally resolved. We aim to develop a computational tool to address the cross-selectivity of ion- selective electrodes.Methods: The proposed tool, namely NESolver, is a chemistry-informed tool for multivariate ion analysis with ion-selective electrodes. It enables precise sensor characteristic quantification and accurate ion concentration inference based on the contributions of all present ions in the sample. The underlying computation is enhanced by techniques stemming from theoretical and empirical chemical knowledge, ensuring the practical applicability of the tool. A highly automated pipeline and an informative text-based user interface have been implemented to streamline usage for individuals with various levels of technical expertise.
Results: We validated the effectiveness of NESolver by benchmarking its performance against existing numerical methods on synthetic samples with diverse composition, demonstrating its marginal superiority in terms of both accuracy and chemical interpretability. By replicating the procedure under different experimental conditions, we also showcased the capability of NESolver to infer ion concentration beyond the calibration range and robustness to noise.
Conclusions: NESolver has shown promising potential as an easy-to-use and chemically interpretable tool for multivariate ion analysis, despite its current performance limitations on samples with complex composition. Future work will focus on enhancing its modelling capability for intricate cross-ion interference and validating its performance on real samples.
- This repository contains the official implementation of NESolver: A Chemistry- Informed Tool for Multivariate Ion Analysis with Ion-Selective Electrodes. We have provided our full source code and documentation here.
- Please use Anaconda/Miniconda to set up the required virtual environment with
the provided environment configuration file.
# 1. Go to the project root directory. cd .../NESolver # 2. Create the virtual environment with the environment configuration file. conda env create -f environment.yml # 3. Activate the virtual environment. conda activate NESolver # 4. Install local packages. pip install .
- All data used in the experiments is provided in the data directory.
-
To run multivariate ion analysis with regression methods, please run the following command:
./script/multivariate_ion_analysis/run_regression.py \ --file_path <file_path> \ --method <method> \ --training_range <training_range> \ --testing_range <testing_range> \ --seed <seed> \
--file_path
: Astr
that specifies the file path of data used for the experiment.--method
: Astr
that specifies the regression method used for the experiment. Please choose one from the following:- 'OLS': Ordinary Least Squares Regression
- 'PLS': Partial Least Squares Regression
- 'BR': Bayesian Ridge Regression
--training_range
: Atuple[int, int]
that specifies the range of data used for training/calibrating the model in the format: '(start, end)'.--testing_range
: Atuple[int, int]
that specifies the range of data used for testing the model in the format: '(start, end)'.--seed
: Anint
that controls the randomness in the experiment.
-
To run multivariate ion analysis with NESolver, please run the following command:
./script/multivariate_ion_analysis/run_optimisation.py \ --file_path <file_path> \ --training_range <training_range> \ --validation_range <training_range> \ --testing_range <testing_range> \ --seed <seed> \
--file_path
: Astr
that specifies the file path of data used for the experiment.--training_range
: Atuple[int, int]
that specifies the range of data used for training/calibrating the model in the format: '(start, end)'.--validation_range
: Atuple[int, int]
that specifies the range of data used for validating the model in the format: '(start, end)'.--testing_range
: Atuple[int, int]
that specifies the range of data used for testing the model in the format: '(start, end)'.--seed
: Anint
that controls the randomness in the experiment.