Learn R Programming

Rdimtools (version 0.3.2)

est.correlation: Correlation Dimension

Description

Correlation dimension is a measure of determining the dimension of a given set. It is often referred to as a type of fractal dimension. Its mechanism is somewhat similar to that of box-counting dimension, but has the advantage of being intuitive as well as efficient in terms of computation with some robustness contingent on the lack of availability for large dataset. $$dim(S) = \lim \frac{\log C(r)}{\log r}$$ as \(r\rightarrow 0\), where \(C(r)=\lim (2/(N-1)*N)\sum_i^N \sum_{j=i+1}^N I(\|x_i-x_j\|\le r)\).

Usage

est.correlation(X, nlevel = 50, show = FALSE)

Arguments

X

an (n-by-p) matrix or data frame whose rows are observations.

nlevel

the number of r (radius) to be tested.

show

a logical; FALSE for not showing visually, TRUE otherwise.

Value

a named data frame containing

r

a vector of radius used.

Cr

a vector of \(C(r)\) as decribed above.

Determining the dimension

In this version, no automated method is included due to lots of possibilities for adopting any types of change point detection methods. Instead, we recommend using visual identification by looking at the slope of the linear part in the middle using either show=TRUE flag or plotting as plot(log(output$r),log(output$Cr)).

References

Grassberger, P. and Procaccia, I. (1983) Measuring the strangeness of strange attractors. Physica D9:189-208.

See Also

est.boxcount

Examples

Run this code
# NOT RUN {
## generate three different dataset
X1 = aux.gensamples(dname="swiss")
X2 = aux.gensamples(dname="ribbon")
X3 = aux.gensamples(dname="twinpeaks")

## visually verify : all should have approximate slope of 2.
par(mfrow=c(1,3))
est.correlation(X1,show=TRUE)
est.correlation(X2,show=TRUE)
est.correlation(X3,show=TRUE)


# }

Run the code above in your browser using DataLab