This repository supports the following submitted manuscript:
Bradley P. Sutliff, Peter A. Beaucage, Debra J. Audus, Sara V. Orski, and Tyler B. Martin, "Sorting Polyolefins with Near-visible Infrared Spectroscopy: Identification of optimal data analysis pipelines and machine learning classifiers" Digital Discovery 2024 NUM (NUM), PAGES DOI:
which compares near-visible infrared spectroscopy coupled with various data preprocessing steps and machine learning techniques to classify polyolefin subclasses and enable better sorting of polyolefins. The repository is intended for the following use cases:
- Illustrate key ideas from the submitted manuscript including using various preprocessing strategies that are commonly applied to near-visible infrared spectra.
- Reproduce figures from our submitted manuscript.
- Allow for full reproducibility of the data in the submitted manuscript.
The included notebooks allow the user to reproduce all of the figures in the corresponding submitted manuscript, using the corresponding data. The notebooks are designed to sequentially walk the user through each of the prepossessing and analyzing steps, generating corresponding data checkpoints and figures along the way. All code is written in Python and requires Python == 3.9. It can be used on any operating system. Other requirements are listed in requirements.txt.
The code can either be run locally or in Google Colab.
First clone the code via
git clone https://github.com/usnistgov/ecaps.gitand navigate to the directory where the repository lives
cd ecapsNext, one needs to create a virtual environment. This can be done using Python virtual environments or with Anaconda. Both options are listed below.
First, make sure you are using Python 3.9.
python3 -m venv envwhere env is the location of the virtual environment
Activate the virtual environment
source env/bin/activateInstall dependencies
python3 -m pip install -r requirements.txtFirst, install conda. Then run the following in a conda-enabled terminal.
conda env create -f ecaps.ymlThis yml file will automatically name the new environment ecaps.
If you are using conda>=4.6, activate the virtual environment via
conda activate ecapsOtherwise, see the conda docs
The Jupyter notebook can by run by using the command
jupyter notebookIf you are interested in running the notebook in Google Colab, first click on the relevant link below. Note that these links were generated by navigating to the notebook of interest on the nir_corr_po GitHub page, for example, https://github.com/usnistgov/pirc/1-pirc_PreProcessingExamples.ipynb and then replace github.com with githubtocolab.com.
This should open the notebook in Google Colab.
Bradley P. Sutliff, PhD
Materials Science and Engineering Division
Material Measurement Laboratory
National Institute of Standards and Technology
Email: Bradley.Sutliff@nist.gov
GithubID: @bpsut
Staff website: https://www.nist.gov/people/bradley-sutliff
If you use the code, please cite our submitted manuscript:
Bradley P. Sutliff, Peter A. Beaucage, Debra J. Audus, Sara V. Orski, and Tyler B. Martin, "Sorting Polyolefins with Near-visible Infrared Spectroscopy: Identification of optimal data analysis pipelines and machine learning classifiers" Digital Discovery 2024 NUM (NUM), DOI:
If you use the data, please cite:
Sutliff, Bradley P., Goyal, Shailja, Martin, Tyler B., Beaucage, Peter A., Audus, Debra J., Orski, Sara V. (2023), Correlating Near-Infrared Spectra to Bulk Properties in Polyolefins, National Institute of Standards and Technology, https://doi.org/10.18434/mds2-3022 (Accessed 2024-07-03)
There is no intent to update/maintain this repository once it is released to the public, given that it is intended to reproduce published figures and analysis that should not change over time.