PCA, PLS, OPLS and spectra
OPLS and OPLS-DA
Predictive components, which carry what in X is related to Y, and orthogonal components, which describe the rest of X's variation: scores and loadings are easier to read (t[1] against to[1], S-plot). One predictive component per Y variable, or one fewer than the classes for OPLS-DA (t[1], t[2]... then to[1], to[2]...); with just one, the predicted values are those of a PLS with the same number of components. With several Y (or more than two classes), each orthogonal weight is made orthogonal to the weights X'y of every column of Y, so the orthogonal components are not related to Y at all (since 0.9.0; version 0.8.0 left a slight link: the OPLS models with several predictive components it made change a little when refitted). Q2 by cross-validation, as for the other models (see below). None of the .usp projects available had an OPLS model: this computation follows Trygg and Wold's paper (2002), with no stored values to compare with; it is checked against a second writing of the paper's algorithm.
VIP
The cut-off is placed automatically at the largest step in the sorted VIPs around 0.8. You can type another cut-off or drag the red line, and Ctrl+click a bar to keep or drop a variable (a plain click highlights it on the model's other plots).
"Refit with VIP variables" makes the model again with the variables kept.
Validation (PLS and PLS-DA)
Permutation test: the values of Y (for a PLS-DA, the classes) are shuffled among the observations 20 times (or more) and the whole model refitted, cross-validation included; the intercepts of R2 and Q2 measure overfitting (a valid model if Q2 < 0.05 and R2 < 0.3 to 0.4, the usual rule).
CV-ANOVA: the model's p (cross-validation residuals against the mean); also in the Summary. Classification (PLS-DA): table of the observations correctly and wrongly classified, with the fitted or cross-validated values, and ROC curves with their area (AUC).
Class models and the Coomans plot
New model › type "Class models": one PCA per category of the class variable, on the observations of that category only ("M5.Gala", "M5.Golden"...), each with its own centres, scaling and number of components. An observation belongs to a class when its distance to the class's model (DModX) doesn't exceed the 5 % DCrit limit: to one class, to several, or to none (an observation of another kind than all the known classes). Plots › Coomans plot: each observation's distances to two of the models, with their limits in red; the table gives, for each class, the share of its observations each model accepts (expected: about 95 % for its own class, 0 % for the others), then each observation's distances and classes.
Spectra
File › Import spectra: choose one or more files (Ctrl+A in a folder takes them all); they become one project, one row per spectrum, one column per wavelength (named by its value: "1450", "3999.69"). Files read:
- JCAMP-DX (.jdx, .dx, .jcm)
- every form (plain or compressed numbers: AFFN, PAC, SQZ, DIF, DUP), several spectra per file; not peak tables, nor NTUPLES (complex NMR, mass spectrometry);
- SPC (.spc)
- Galactic (GRAMS, Thermo), new and old format, one or more spectra;
- text (.csv, .txt...)
- a column of x values, then one column per spectrum, with or without a header row; the lines an instrument writes before the numbers are skipped.
A spectrum is named after its file (and the block's title or its number when a file holds several). If the spectra don't all have the same x values, they are interpolated (linearly) onto those of the first one, in the range they all share; the status bar says so. Different units (nm and cm-1, absorbance and transmittance) are refused.
Information (optional): a table (Excel, CSV...) whose first column gives the name of each file, with or without its extension, and the other columns information to join to the spectra (contents, classes, batches); they come before the spectra. The status bar says how many spectra didn't find their row. A single JCAMP-DX or SPC file also opens with File › Open, and a file of new spectra on the same grid is predicted with Predict › Predict a file.
New model › General › Spectral preprocessing: each observation is a spectrum (its quantitative X variables, in the order of the table), corrected before scaling by one to three steps, in order:
- SNV
- each spectrum centred on its mean and divided by its standard deviation;
- MSC
- each spectrum fitted to the mean spectrum of the model's observations (x = a + b r), then replaced by (x - a) / b; a prediction uses that mean spectrum;
- Detrend
- a degree-2 polynomial of the wavelength, fitted to the spectrum, is removed from it (Barnes et al., 1989; often after SNV);
- Baseline
- the spectrum's lower convex hull (the segments joining its lowest points, from one end to the other) is removed from it; the corrected spectrum is zero or positive;
- Savitzky–Golay
- smoothing, first or second derivative, in a window of n variables (odd) with a polynomial of degree d. Each range of neighbouring variables in the table is treated on its own: a window never reaches across a range left out.
The wavelength (for Detrend and Baseline) is the number read in the variables' names when each has one, all different; otherwise their place in the table.
For spectra, one often centres without scaling ("Centring only" scaling). Only MSC depends on the other observations (the mean spectrum): in cross-validation, each group is corrected with the mean spectrum of the other observations. Plots › Profiles (spectra): loadings, coefficients, VIP, or the spectra themselves (before or after preprocessing) as lines; the horizontal axis is the number read in the variables' names ("1450 nm") when each has one; the lines break where variables are out of the model. A click on a spectrum selects its observation.
Wavelength ranges: tick "Choose ranges", then drag across the plot (one or more ranges, in orange); "New model without these ranges" (the water bands, for example) or "New model with these ranges only" opens New model with the model's settings and those X variables, to check before fitting. The model's other X variables (qualitative) stay.
Plots › iPLS (spectrum intervals), for a model with Y: the spectrum (the model's quantitative X variables, in their order) is preprocessed once, whole, as for the model (with MSC, also for each cross-validation group, with the mean spectrum of the other observations), then cut into n intervals of the same width; each one is a PLS on its range (with the model's scaling and its other X variables), with 1 to A components. A bar per interval gives its smallest RMSEcv (in the units of Y, as in the summary), with that number of components written on it; in green, the intervals that predict better than the whole spectrum (red dashes); the grey line is the mean spectrum after preprocessing. Click bars to choose intervals, then "New model with these intervals" or "without these intervals". Such a model preprocesses its own variables: with SNV, MSC, detrend or baseline, its RMSEcv can differ from the bar's. Method: Nørgaard et al. (2000), Applied Spectroscopy 54, 413–419.
This page is part of the guide installed with Nuée (USER-GUIDE.txt, also in Help › User guide).