Learn R Programming

RSDA (version 2.0)

dist.interval: Distance for Symbolic Interval Variables.

Description

This function computes and returns the distance matrix by using the specified distance measure to compute distance between symbolic interval variables.

Usage

dist.interval(sym.data, variables, gamma = 0.5, method = "Minkowski",
  normalize = TRUE, SpanNormalize = FALSE, q = 1, euclidea = TRUE,
  pond = rep(1, length(variables)))

Arguments

sym.data

A symbolic object

variables

Numeric vector with the number of the variables to use.

gamma

gamma value for the methods ichino and minkowski.

method

Method to use (Gowda.Diday, Ichino, Minkowski, Hausdorff)

normalize

A logical value indicating whether normalize the data in the ichino or hausdorff method.

SpanNormalize

A logical value indicating whether

q

q value for the hausdorff method.

euclidea

A logical value indicating whether use the euclidean distance.

pond

A numeric vector

Value

An object of class "dist"

Examples

Run this code
# NOT RUN {
data("table7")
ex3 <- classic.to.sym(table7, concept=c("Animal"),variables=c("Height", "Weight")
,variables.types=c("$I", "$I"))
dist.interval(ex3,c(1,2),method="Gowda.Diday",normalize=FALSE)
dist.interval(ex3,c(1,2),gamma=0.5,method="Ichino",normalize=FALSE)
dist.interval(ex3,c(1,2),gamma=0.5,method="Minkowski",normalize=FALSE,q=1)
dist.interval(ex3,c(1,2),gamma=0.5,method="Minkowski",normalize=FALSE,q=2)
dist.interval(ex3,c(1,2),gamma=0.5,method="Hausdorff",normalize=FALSE,
SpanNormalize=FALSE,euclidea=TRUE)
dist.interval(ex3,c(1,2),gamma=0.5,method="Hausdorff",normalize=FALSE,
SpanNormalize=TRUE,euclidea=TRUE)
# }

Run the code above in your browser using DataLab