Skip to contents

Create a summary data frame of extrema information

Usage

extrema.summary(res, edgelen.list, y)

Arguments

res

An object from compute.extrema.hop.nbhds() containing extrema_df.

edgelen.list

A list where edgelen.list[[i]] contains edge lengths from vertex i to its neighbors.

y

Numeric vector of outcome values at all vertices.

Value

A data frame with columns:

  • label: Label for the extremum (e.g., "m1" for minima, "M1" for maxima).

  • vertex: Vertex index.

  • value: Function value at the extremum.

  • rel.value: Relative function value (value / mean(y)).

  • type: "min" for minima, "max" for maxima.

  • hop.idx: Hop index of the extremum.

  • p.d1: Percentile of nearest neighbor distance. Higher values (approaching 1) indicate the vertex is in a sparser region where neighbors are farther away.

  • p.mean.nbrs.dist: Percentile of mean neighbor distance. Higher values indicate sparser neighborhoods.

Maxima are sorted by value (descending), minima by value (ascending).

Details

The inverse density measures (p.d1, p.mean.nbrs.dist) quantify local sparsity. A value of 0.95 means 95% of vertices have distances less than or equal to this vertex's distance, indicating this vertex is in a sparse region. Isolated vertices (no neighbors) are assigned Inf distances and will have inv measures of 1.0.