knngow: K-nn classification using Gower distance

Description Usage Arguments Value Author(s) See Also Examples

View source: R/knngow.R

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)

dprep documentation built on May 29, 2017, 11:01 a.m.