eccentricity_filter {mappeR}R Documentation

Compute eccentricity of data points

Description

Compute eccentricity of data points

Usage

eccentricity_filter(dists)

Arguments

dists

A distance matrix associated to a data frame.

Value

A vector of centrality measures, calcuated per data point as the sum of its distances to every other data point, divided by the number of points.

Examples

num_points = 5000

P.data = data.frame(
  x = sapply(1:num_points, function(x)
    sin(x) * 10) + rnorm(num_points, 0, 0.1),
  y = sapply(1:num_points, function(x)
    cos(x) ^ 2 * sin(x) * 10) + rnorm(num_points, 0, 0.1),
  z = sapply(1:num_points, function(x)
    10 * sin(x) ^ 2 * cos(x)) + rnorm(num_points, 0, 0.1)
)

P.dist = dist(P.data)
eccentricity = eccentricity_filter(P.dist)

[Package mappeR version 1.2.0 Index]