edge.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.
edge.length.density.stiffness(
edge.weights,
method = c("density", "uniform", "distance_power"),
mix = 0,
bandwidth = NULL,
density.n = 512L,
transform = c("identity", "sqrt", "log"),
distance.power = 0,
stiffness.floor = 0,
stiffness.ceiling = Inf
)A list with stiffness, raw signal diagnostics, estimated mode, and
clipping/normalization metadata.
Positive numeric edge lengths.
Stiffness rule. "density" estimates an empirical density,
"uniform" returns equal stiffnesses, and "distance_power" uses
(w / median(w))^distance.power.
Continuation parameter in [0, 1]. 0 uses the selected method;
1 returns uniform stiffness.
Optional bandwidth passed to stats::density().
Number of evaluation points for stats::density().
Optional transformation of the raw density/power signal before mixing and normalization.
Exponent for method = "distance_power".
Optional clipping bounds applied before the final mean-one normalization.
stiffness <- edge.length.density.stiffness(
c(0.8, 0.9, 1, 1.1, 1.2, 1.3), density.n = 32
)
Run the code above in your browser using DataLab