ken.sto {soil.spec} | R Documentation |
The function chooses points based on Euclidean distance measure most representative samples. One can (i) select a number or a percentage of a sample set or (ii) divide a sample set into calibration and representative validation set.
ken.sto(inp, per = "T", per.n = 0.3, num, va = "F", sav = "T", path = "", out = "Sel")
inp |
a numerical matrix or data.frame containing the input spectra |
per |
a logical value indicating whether the selected samples should be a percentage (given in |
per.n |
a numerical value between 0 and 1. |
num |
a numerical value between 1 and the sample number minus 1. |
va |
a logical value indicating whether to select samples out of |
sav |
a logical value indicating whether the function output shall be saved. |
path |
a character giving the path name where the function output shall be saved. |
out |
a character giving the function output name, in case |
Sample selection is done following and adapted procedure from Kennard & Stone (1969). It is a stepwise procedure by maximizing the Euclidean distance based on the important number of principal components to the objects already chosen. The number of important principal components is selected so that the increase in cumulative explained variance within the next three components is lower than 4 percent. The starting samples are the two extreme samples (most negative and positive ones) of the important principal components.
per.n
having a value of 0.4 while va
equal to "F"
chooses 40 percent of the sample set. When va
is equal to "T"
the validation set comprises 40 percent of the sample set.
A graph is given back showing the selected samples in the principal component space (only the important PC's). This is the same graphic generated by plot.ken.sto
.
ken.sto
returns a list with class "ken.sto"
containing the following components:
Calibration and validation set |
the logical object |
Number important PC |
integer giving the number of chosen important components - important for choosing the starting samples. |
PC space important PC |
score value matrix of important principal components. |
Chosen samples names |
chosen sample names when |
Chosen row number |
chosen row numbers when |
Chosen calibration sample names |
chosen calibration sample names when |
Chosen calibration row number |
chosen calibration row numbers when |
Chosen validation sample names |
chosen validation sample names when |
Chosen validation row number |
chosen validation row numbers when |
Thomas Terhoeven-Urselmans
Kennard, R. W. and Stone, L. A. (1969) Computer aided design of experiments. Technometrics 11(1), 137-148.
## Not run: ken.sto(inp, per = "T", per.n = 0.3, num, va = "F", sav = "T", path = "", out = "Sel") ## Not run: plot(ken.sto)(x,...)