powered by
This function computes the distance from every observation in the test set to every observation in the train test
ipfDistance(train, test, method = "euclidean", subset = NULL, norm = 2, sd = 10, epsilon = 1e-30, alpha = 20, threshold = 20)
a vector, matrix or data frame containing a set of training examples
a vector, matrix or data frame containing a set of test examples
The method to be used to calculate the distance. Implemented methods are: 'euclidean', 'manhattan', 'norm', 'LGD' and 'PLGD'
columns to use to compute the distance.
parameter for the 'norm' method
parameter for 'LGD' and 'PLGD' methods
parameter for 'PLGD' method
This function returns a matrix with dimensions: nrow(test) x nrow(train), containing the distances from test observations to train observations
# NOT RUN { dist <- ipfDistance(ipftrain[,1:168], ipftest[,1:168]) dist <- ipfDistance(ipftrain, ipftest, subset = c('X', 'Y'), method = 'manhattan') # }
Run the code above in your browser using DataLab