Instrumentation & Measurement Magazine 24-4 - 46

Fig. 4. Score plots of the first three components (PC1-PC2, PC1-PC3 and PC2-PC3). Percent variance captured by each PC is reported in parenthesis along each
axis. Sample names stand for the spectra Rruff ID.
first two components fit the main features in the high-wavenumber
region, while the third one is able to fit the peaks in the
part of the spectrum below 600 cm−1
.
After the number of components has been chosen, it is
possible to move to the main outcome of the PCA model,
that is the clustering of the different samples in the so-called
'score' plot. Score charts, also named 'biplots,' show the
eigenvalues of the different samples (two at the time), so
spectra that appear close in these plots are similar to each
other. In the presented example (Fig. 4), it is possible to see
that the measurements group in five clusters, corresponding
to the five analyzed copper sulphates (in order to make
it more evident, different compounds were labelled with
different colors). As can be seen, langite and brochantite
have similar positive PC1 values but are discriminated by
PC2, which is positive only for the latter. Both have a peak
at about 970 cm−1
additional sharp peak at about 430 cm−1
, modelled by PC1, while langite has an
, captured by a minimum
in PC2 loading, which is not present in brochantite.
The three other compounds, having negative PC1 values,
are characterized by a peak at about 986 cm−1
, modelled by
the PC1 minimum in that region. The discrimination among
chalcantite, antlerite and orthoserpierite is then obtained
thanks to PC2 and PC3, that are able to model the differences
in the spectral region below 600 cm−1
. Antlerite and
orthoserpierite have similar spectra, as highlighted by the
similar PC1 and PC3 eigenvalues, but can be differentiated
thanks to PC2.
This simple example demonstrated how it would be
possible to easily discriminate different compounds after
acquiring several measurements on unknown samples. As
a matter of fact, PCA alone would not be able to identify the
species, as this would require additional techniques such as
Partial Least Square Discriminant Analysis (PLS-DA) [5],
[6], but it can greatly speed up the analysis of large number
of measurements providing an effective and unsupervised
method to recognize differences in acquired spectra.
46
Outliers Detection and Model
Optimization
Obtaining a satisfactory and clear clustering is not always
straightforward when dealing with PCA. This could be because
analyzed samples do not show relevant differences to
be classified in different groups, but sometimes this could be
due to an incorrect model construction. PCA is deeply influenced
by outliers and noisy measurements, so they should be
removed and analyzed separately to avoid spoiling the model.
It is possible to identify the presence of outliers thanks to the
calculation of two quantities: leverage and root mean square
deviation (RMSD) [13]. The former is defined as the diagonals
of the " hat matrix " (H):
H T TT T

 
RMSD   
J
J
i1 X TPT

TT
1
(4)
where T is the score matrix, while the latter can be computed
as follows:
2
(5)
where is J the number of points for each measurement (1000 in
the example here presented), X is the original data matrix, T is
the score matrix and P is the loading matrix. Leverage quantifies
the influence of a single sample on the model construction;
measurements characterized by high leverage values should
be discarded from the processing because they tend to bias
the model. A common choice often found in literature is to
set the threshold value equal to three times the average leverage
value, but sometimes a more restrictive view sets this limit
to three times the median value [14]; in this way, all measurements
will give a similar contribution to model construction.
On the other hand, root mean square deviation quantifies
the difference between the original spectrum and the same
spectrum after inverse transformation from PC space to the
original variables. So, in this case the principal components
number has a great influence on the calculated RMSD because
IEEE Instrumentation & Measurement Magazine
June 2021

Instrumentation & Measurement Magazine 24-4

Table of Contents for the Digital Edition of Instrumentation & Measurement Magazine 24-4

No label
Instrumentation & Measurement Magazine 24-4 - No label
Instrumentation & Measurement Magazine 24-4 - Cover2
Instrumentation & Measurement Magazine 24-4 - 1
Instrumentation & Measurement Magazine 24-4 - 2
Instrumentation & Measurement Magazine 24-4 - 3
Instrumentation & Measurement Magazine 24-4 - 4
Instrumentation & Measurement Magazine 24-4 - 5
Instrumentation & Measurement Magazine 24-4 - 6
Instrumentation & Measurement Magazine 24-4 - 7
Instrumentation & Measurement Magazine 24-4 - 8
Instrumentation & Measurement Magazine 24-4 - 9
Instrumentation & Measurement Magazine 24-4 - 10
Instrumentation & Measurement Magazine 24-4 - 11
Instrumentation & Measurement Magazine 24-4 - 12
Instrumentation & Measurement Magazine 24-4 - 13
Instrumentation & Measurement Magazine 24-4 - 14
Instrumentation & Measurement Magazine 24-4 - 15
Instrumentation & Measurement Magazine 24-4 - 16
Instrumentation & Measurement Magazine 24-4 - 17
Instrumentation & Measurement Magazine 24-4 - 18
Instrumentation & Measurement Magazine 24-4 - 19
Instrumentation & Measurement Magazine 24-4 - 20
Instrumentation & Measurement Magazine 24-4 - 21
Instrumentation & Measurement Magazine 24-4 - 22
Instrumentation & Measurement Magazine 24-4 - 23
Instrumentation & Measurement Magazine 24-4 - 24
Instrumentation & Measurement Magazine 24-4 - 25
Instrumentation & Measurement Magazine 24-4 - 26
Instrumentation & Measurement Magazine 24-4 - 27
Instrumentation & Measurement Magazine 24-4 - 28
Instrumentation & Measurement Magazine 24-4 - 29
Instrumentation & Measurement Magazine 24-4 - 30
Instrumentation & Measurement Magazine 24-4 - 31
Instrumentation & Measurement Magazine 24-4 - 32
Instrumentation & Measurement Magazine 24-4 - 33
Instrumentation & Measurement Magazine 24-4 - 34
Instrumentation & Measurement Magazine 24-4 - 35
Instrumentation & Measurement Magazine 24-4 - 36
Instrumentation & Measurement Magazine 24-4 - 37
Instrumentation & Measurement Magazine 24-4 - 38
Instrumentation & Measurement Magazine 24-4 - 39
Instrumentation & Measurement Magazine 24-4 - 40
Instrumentation & Measurement Magazine 24-4 - 41
Instrumentation & Measurement Magazine 24-4 - 42
Instrumentation & Measurement Magazine 24-4 - 43
Instrumentation & Measurement Magazine 24-4 - 44
Instrumentation & Measurement Magazine 24-4 - 45
Instrumentation & Measurement Magazine 24-4 - 46
Instrumentation & Measurement Magazine 24-4 - 47
Instrumentation & Measurement Magazine 24-4 - 48
Instrumentation & Measurement Magazine 24-4 - 49
Instrumentation & Measurement Magazine 24-4 - 50
Instrumentation & Measurement Magazine 24-4 - 51
Instrumentation & Measurement Magazine 24-4 - 52
Instrumentation & Measurement Magazine 24-4 - 53
Instrumentation & Measurement Magazine 24-4 - 54
Instrumentation & Measurement Magazine 24-4 - 55
Instrumentation & Measurement Magazine 24-4 - 56
Instrumentation & Measurement Magazine 24-4 - 57
Instrumentation & Measurement Magazine 24-4 - 58
Instrumentation & Measurement Magazine 24-4 - 59
Instrumentation & Measurement Magazine 24-4 - 60
Instrumentation & Measurement Magazine 24-4 - 61
Instrumentation & Measurement Magazine 24-4 - 62
Instrumentation & Measurement Magazine 24-4 - 63
Instrumentation & Measurement Magazine 24-4 - 64
Instrumentation & Measurement Magazine 24-4 - 65
Instrumentation & Measurement Magazine 24-4 - 66
Instrumentation & Measurement Magazine 24-4 - 67
Instrumentation & Measurement Magazine 24-4 - 68
Instrumentation & Measurement Magazine 24-4 - 69
Instrumentation & Measurement Magazine 24-4 - 70
Instrumentation & Measurement Magazine 24-4 - 71
Instrumentation & Measurement Magazine 24-4 - 72
Instrumentation & Measurement Magazine 24-4 - 73
Instrumentation & Measurement Magazine 24-4 - 74
Instrumentation & Measurement Magazine 24-4 - 75
Instrumentation & Measurement Magazine 24-4 - 76
Instrumentation & Measurement Magazine 24-4 - 77
Instrumentation & Measurement Magazine 24-4 - 78
Instrumentation & Measurement Magazine 24-4 - 79
Instrumentation & Measurement Magazine 24-4 - 80
Instrumentation & Measurement Magazine 24-4 - 81
Instrumentation & Measurement Magazine 24-4 - 82
Instrumentation & Measurement Magazine 24-4 - 83
Instrumentation & Measurement Magazine 24-4 - 84
Instrumentation & Measurement Magazine 24-4 - 85
Instrumentation & Measurement Magazine 24-4 - 86
Instrumentation & Measurement Magazine 24-4 - 87
Instrumentation & Measurement Magazine 24-4 - 88
Instrumentation & Measurement Magazine 24-4 - 89
Instrumentation & Measurement Magazine 24-4 - 90
Instrumentation & Measurement Magazine 24-4 - 91
Instrumentation & Measurement Magazine 24-4 - 92
Instrumentation & Measurement Magazine 24-4 - 93
Instrumentation & Measurement Magazine 24-4 - 94
Instrumentation & Measurement Magazine 24-4 - 95
Instrumentation & Measurement Magazine 24-4 - 96
Instrumentation & Measurement Magazine 24-4 - 97
Instrumentation & Measurement Magazine 24-4 - 98
Instrumentation & Measurement Magazine 24-4 - 99
Instrumentation & Measurement Magazine 24-4 - 100
Instrumentation & Measurement Magazine 24-4 - 101
Instrumentation & Measurement Magazine 24-4 - 102
Instrumentation & Measurement Magazine 24-4 - 103
Instrumentation & Measurement Magazine 24-4 - 104
Instrumentation & Measurement Magazine 24-4 - 105
Instrumentation & Measurement Magazine 24-4 - 106
Instrumentation & Measurement Magazine 24-4 - 107
Instrumentation & Measurement Magazine 24-4 - 108
Instrumentation & Measurement Magazine 24-4 - 109
Instrumentation & Measurement Magazine 24-4 - 110
Instrumentation & Measurement Magazine 24-4 - 111
Instrumentation & Measurement Magazine 24-4 - 112
Instrumentation & Measurement Magazine 24-4 - 113
Instrumentation & Measurement Magazine 24-4 - 114
Instrumentation & Measurement Magazine 24-4 - 115
Instrumentation & Measurement Magazine 24-4 - 116
Instrumentation & Measurement Magazine 24-4 - 117
Instrumentation & Measurement Magazine 24-4 - 118
Instrumentation & Measurement Magazine 24-4 - 119
Instrumentation & Measurement Magazine 24-4 - 120
Instrumentation & Measurement Magazine 24-4 - Cover3
Instrumentation & Measurement Magazine 24-4 - Cover4
https://www.nxtbook.com/allen/iamm/24-8
https://www.nxtbook.com/allen/iamm/24-6
https://www.nxtbook.com/allen/iamm/24-5
https://www.nxtbook.com/allen/iamm/24-4
https://www.nxtbook.com/allen/iamm/24-3
https://www.nxtbook.com/allen/iamm/24-2
https://www.nxtbook.com/allen/iamm/24-1
https://www.nxtbook.com/allen/iamm/23-9
https://www.nxtbook.com/allen/iamm/23-8
https://www.nxtbook.com/allen/iamm/23-6
https://www.nxtbook.com/allen/iamm/23-5
https://www.nxtbook.com/allen/iamm/23-2
https://www.nxtbook.com/allen/iamm/23-3
https://www.nxtbook.com/allen/iamm/23-4
https://www.nxtbookmedia.com