Usage
compknn.tune(x, ina, M = 10, A = 5, type= "S", mesos = TRUE,
a = seq(-1, 1, by = 0.1), apostasi = "ESOV", mat = NULL, graph = FALSE)
Arguments
x
A matrix with the available compositional data. Zeros are allowed, but you must be carefull to choose strictly positive vcalues of $\alpha$ or not to set apostasi= "Ait".
ina
A group indicator variable for the avaiable data.
M
The number of folds to be used. This is taken into consideration only if the matrix "mat" is not supplied.
A
The maximum number of nearest neighbours to consider. The maximum is actuall A + 1, because the 1 neasrest neighbour is not used.
type
This can be either "S" for the standard k-NN or "NS" for the non standard (see details).
mesos
This is used in the non standard algorithm. If TRUE, the arithmetic mean of the distances is calulated, otherwise the harmonic mean is used (see details).
a
A grid of values of $\alpha$ to be used only if the distance chosen allows for it.
apostasi
The type of distance to use. "ESOV", "taxicab", "Ait", "Hellinger" or "angualar". See the references for them.
mat
You can specify your own folds by giving a mat, where each column is a fold. Each column contains indices of the observations. You can also leave it NULL and it will create folds.
graph
If set to TRUE a grpah with the results will appear.