Skip to main content
U.S. flag

An official website of the United States government

Python Hyperspectral Analysis Tool (PyHAT) Partial Least Squares Cross Validation Example

Detailed Description

This figure shows the results of cross-validating a Partial Least Squares (PLS) model to predict the abundance of CaO in geologic targets using PyHAT. Cross validation is necessary to optimize the parameters of a regression algorithm to avoid overfitting. This figure shows that the root mean squared error of calibration (RMSEC; the error when predicting the same data on which the model was trained) continually decreases as the number of components in the PLS model increases. However, the root mean squared error of cross validation (RMSECV; the error when predicting data iteratively held out from training the model) stops improving after six components. Thus, the optimal choice is six. 

This figure is one of a series of figures used to demonstrate some of the capabilities of the PyHAT software.


Public Domain.