getScores | R Documentation |
Calculate amplitudes of spectroscopic components (a.k.a. scores) by
matrix multiplication (see section "Detais") and properly label created
hyperSpec
object.
getScores(
sp,
loadings = NULL,
xLabel = "Component",
yLabel = "Amplitude",
names.var = "cNames",
scores = NULL
)
sp |
Spectroscopic data
(either a |
loadings |
Components' spectra (loadings) as either a matrix or a
|
xLabel |
A label for x axis. Default is "Component". |
yLabel |
A label for y axis. Default is "Amplitude". |
names.var |
A name of variable in |
scores |
A matrix of known/already calculated scores to convert to
|
Equation of matrix multiplication to calculate scores:
scores = sp * loadings * inv(loadings' * loadings)
This formula is taken and adapted from [1].
Amplitudes of the components (i.e., scores), tha corespond to
observations (spectra) in object sp
.
Vilmantas Gegzna
[1] M. Brydegaard et al. IEEE Photonics J 2011:3(3);406-21.
qplot_scores
Other component analysis / factorisation related functions in spHelper:
infoDim()
,
plot_spDiff()
,
qplot_infoDim()
,
qplot_kAmp()
,
qplot_kSp()
,
qplot_spc()
,
reconstructSp()
,
sortLoadings()
,
unipeak()
,
whichOutlier()
sc <- getScores(Spectra2, Loadings2)
sc
qplot_scores(sc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.