Newer
Older
This package aims to provide a workflow for users who want to perform chemical analyses and predict characteristics using the NIRS technique.
The process includes:
- sample selection - you can upload all your NIRS spectra and it'll help to select the samples to analyse chemically.
- model creation - the PINARD (https://github.com/GBeurier/pinard) package creates a prediction model with spectra and related chemical analysis.
More algorythms had been added like LWPLR from Jchemo (https://github.com/mlesnoff/Jchemo.jl), PLSR with wavelength selection, etc.
- predictions - the models are used to predict chemical values for unknown samples. We provide information for confidence in the predicted values depending on the samples and the model used.
If one wants to use data stored in a SQL database, the config file is in the config/ folder.
The SQL script to create the database is in this same folder.
This package is written in python. You can clone the repository: git clone https://src.koda.cnrs.fr/CEFE/PACE/nirs_workflow.git
Then install the requirements: pip install -r requirements.txt
(OPTIONNAL) To use Locally weighted PLS Regression for creation model, you will need to install Jchemo.jl (https://github.com/mlesnoff/Jchemo.jl), a Julia package.
> python
'>>> import julia
'>>> julia.install()
'>>> from julia import Pkg
'>>> Pkg.add(["Jchemo","DataFrames","Pandas"])
You can then run (CLI): streamlit run ./app.py from within your src/ folder.
The web app allows you to process sample selection, model creation and predictions with a simple interface or the advanced one.
## Documentation
The doc is generated with mkDoc and Python DocStrings.
From CLI, run
> mkdocs serve
Contributors:
- Nicolas Barthes (CNRS)
- Abderrahim Diane (Montpellier University)
- Mouhcine Maimouni
- Rémy Beugnon
- Alexandre Granier (IRD)
- Vincent Nègre (CNRS)
We would like to thank Matthieu Lesnoff (CIRAD) for discussions and the Jchemo Toolbox.