calculateDistances {mldr.resampling}R Documentation

Auxiliary function used to calculate the distances between an instance and the ones with a specific active label. Euclidean distance is calculated for numeric attributes, and VDM for non numeric ones.

Description

Auxiliary function used to calculate the distances between an instance and the ones with a specific active label. Euclidean distance is calculated for numeric attributes, and VDM for non numeric ones.

Usage

calculateDistances(sample, rest, label, D, tableVDM = NULL)

Arguments

sample

Index of the sample whose distances to other samples we want to know

rest

Indexes of the samples to which we will calculate the distance

label

Label that must be active

D

mld mldr object with the multilabel dataset to preprocess

tableVDM

Dataframe object containing previous calculations for faster processing. If it is empty, the algorithm will be slower

Value

A list with the distance to the rest of samples


[Package mldr.resampling version 0.2.3 Index]