dist.entropy {truecluster}R Documentation

Entropy distance between variables

Description

This functions calculates the entropy distance between variables

Usage

dist.entropy(x)

Arguments

x a matrix of categorical raw data (cases in rows, variables in columns)

Value

An object of class dist.

Author(s)

Jens Oehlschlaegel

References

MacKay, David J.C. (2003). Information Theory, Inference, and Learning Algorithms (Exercise 8.5). Cambridge University Press.

See Also

dist, cor2dist, cor2sim, sim2dist

Examples

  n <- 1000
  x <- runif(n)
  x <- cbind(
    x
  , x
  , 2*x
  , x+runif(n, max=0.1)
  , x+runif(n)
  , x+runif(n, max=10)
  , x+runif(n, max=10)
  , 2*(x+runif(n, max=10))
  , 2*(x+runif(n, max=10))
  , runif(n, max=22)
  , runif(n, max=22)
  )
  x <- round(x)
  colnames(x) <- letters[1:ncol(x)]
  D <- dist.entropy(x)
  plot(hclust(D, method="average"))

[Package truecluster version 0.3 Index]