Learn R Programming

dprep (version 3.0.2)

acugow: Gower distance from a vector to a matrix

Description

This function finds out the gower distance between a vector and a matrix

Usage

acugow(x, data, vnom = NULL)

Arguments

x
A Vector of attributes values
data
A matrix dataset
vnom
A vector indicating the columns with nominal attributes in the matrix dataset

Value

  • matdista matrix containing the components of the distance vector from x to each row of data
  • dista vector containing the distances from x to each row of data

See Also

reliefcont

Examples

Run this code
data(crx)
crx.imp=ce.impute(crx,"knn",nomatr=c(1,4,5,6,7,9,10,12,13),3)
acugow(crx.imp[1,-16],crx.imp[-1,-16],vnom=c(1,4,5,6,7,9,10,12,13))

Run the code above in your browser using DataLab