Construct edge-length stiffnesses for edge-isometric GMDS layouts
Source:R/export_examples.R, R/gmds_layout_interface.R
edge.length.density.stiffness.Rdedge.length.density.stiffness() constructs stiffnesses for edge-only
geodesic-MDS layouts. It turns positive edge lengths into
spring stiffnesses normalized to mean one. The "density" method emphasizes
edge lengths near the empirical edge-length density mode, and mix provides
a continuation path from that density-weighted signal to uniform stiffness.
Arguments
- edge_weights
Positive numeric edge lengths.
- method
Stiffness rule.
"density"estimates an empirical density,"uniform"returns equal stiffnesses, and"distance_power"uses(w / median(w))^distance_power.- mix
Continuation parameter in
[0, 1].0uses the selected method;1returns uniform stiffness.- bandwidth
Optional bandwidth passed to
stats::density().- density_n
Number of evaluation points for
stats::density().- transform
Optional transformation of the raw density/power signal before mixing and normalization.
- distance_power
Exponent for
method = "distance_power".- stiffness_floor, stiffness_ceiling
Optional clipping bounds applied before the final mean-one normalization.
Value
A list with stiffness, raw signal diagnostics, estimated mode, and
clipping/normalization metadata.
Examples
stiffness <- edge.length.density.stiffness(
c(0.8, 0.9, 1, 1.1, 1.2, 1.3), density_n = 32
)