Share Email Print

Spie Press Book

Automating Vibrational Spectroscopy Data Preprocessing and Multivariate Analysis with MATLAB
Author(s): Tanmoy Bhattacharjee
Format Member Price Non-Member Price

Book Description

This Spotlight teaches the commands necessary to analyze spectroscopic data (Raman/FTIR) using MATLAB. It explains how to build an analysis routine step by step and perform preprocessing and multivariate analysis (PCA, PC-LDA, SVM, LOOCV, prediction) with a single click. The script at the end of the book can be used to build a script tailored to the reader's laboratory routine.

Book Details

Date Published: 9 September 2019
Pages: 93
ISBN: 9781510631250
Volume: SL52

Table of Contents
SHOW Table of Contents | HIDE Table of Contents

1 Background

2 Overview

3 MATLAB Desktop

4 Note on Array Indexing and the "Loop" Function
4.1 Array indexing
4.2 "Loop" function

5 Basic Preprocessing Operations
5.1 Importing a spectrum
5.2 Separate wavenumbers from intensity
5.3 Perform the first derivation
5.4 Select a specific spectral range
5.5 Area normalization

6 Automating Preprocessing for Multiple Spectral Files

7 Automating Preprocessing for Multiple Files Contained in Multiple Subfolders

8 Performing Multivariate Analysis
8.1 Principal component analysis
8.2 Principal component-linear discriminant analysis
8.3 Support vector machine

9 PCA Plotting

10 Turning Features On and Off

11 Note on MATLAB Functions

12 Final Note on How to Best Use the Script

13 Common Errors

14 Automating Mean and Standard Deviations Calculations: An Example



Vibrational spectroscopy, with its sensitivity to biochemical changes and its potential for rapid noninvasive use, is a powerful tool for myriad clinical applications. A tremendous amount of research has been and continues to be reported, supporting existing applications and opening up exciting new avenues. As a result, the amount of data generated has exploded, demanding newer and faster analysis tools. It is no longer tenable to rely on programming experts for each and every problem since it restricts quick testing of ideas and exploring workflows. Knowledge of basic programming can help spectroscopy practitioners save enormous amounts of time spent on data analysis and channel that time toward experimentation. Learning general programming, however, can be time consuming and labor intensive. Therefore, this Spotlight aims to specifically teach only the commands necessary to analyze spectroscopic data (Raman/Fourier transform infrared (FTIR)) using MATLAB®. It explains how to build an analysis routine to apply a step-by-step combination of MATLAB commands and perform preprocessing and multivariate analysis directly from spectra-containing folders with a single click. As an example, an automated script that can import data from several folders, perform first derivatization, select a specific spectral range, perform area normalization and principal component analysis (PCA), plot PCA scores, save principal components, perform linear discriminant analysis (LDA) on PCA results, provide confusion matrix, cross-validate the LDA by the leave-one-out method, and perform predictions using the LDA model, all with a single click, is discussed in detail. A script for a support vector machine is also dealt with briefly. Using these scripts, the reader can build their own script dedicated to the routines used in their laboratory by making minor changes. As an example, modification of the code to automate mean and standard deviation calculations is included. The Spotlight is specifically meant for specialists from backgrounds other than mathematics and programming who wish to automate repetitive analysis and thus avoid technical jargon.

Tanmoy Bhattacharjee
August 2019

© SPIE. Terms of Use
Back to Top