Description Usage Arguments Value Examples
Implements the k-nearest neighbors algorithm
1 2 3  | 
train_fgp | 
 a data frame containing the fingerprint vectors of the training set  | 
train_pos | 
 a data frame containing the positions of the training set observations  | 
k | 
 the k parameter for knn algorithm (number of nearest neighbors)  | 
method | 
 the method to compute the distance between the RSSI vectors: 'euclidean', 'manhattan', 'norm', 'LGD' or 'PLGD'  | 
weights | 
 the algorithm to compute the weights: 'distance' or 'uniform'  | 
norm | 
 parameter for the 'norm' method  | 
sd | 
 parameter for 'LGD' and 'PLGD' methods  | 
epsilon | 
 parameter for 'LGD' and 'PLGD' methods  | 
alpha | 
 parameter for 'PLGD' method  | 
threshold | 
 parameter for 'PLGD' method  | 
FUN | 
 an alternative function provided to compute the distance. This function must return a matrix of dimensions: nrow(test) x nrow(train), containing the distances from test observations to train observations. The two first parameters taken by the function must be train and test  | 
... | 
 additional parameters for provided function FUN  | 
An S3 object of class ipfModel, with the following properties: params -> a list with the parameters passed to the function data -> a list with the fingerprints and locations
1  | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.