K-nn classification using Gower distance

Description

This function performs classification using the k- nearest neighbors but using Gower distance rather than Euclidean distance. It is recommended if the dataset has niminal and continuous attributes.

Usage

1
knngow(train, test, k)

Arguments

train

A matrix containing the training dataset.

test

A matrix containing the test dataset.

k

The number of neighbors to be used.

Value

predclass

A vector of predited classes

Author(s)

Edgar Acuna

See Also

acugow

Examples

1
2
3
## Not run: data(crx)
knngow(crx,crx,3)
## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.