<- Trend functions | Technical reference index | Parameterization crosswalk ->
A link function maps a natural-space value InverseLink evaluates ILinkFunction contract used by RMC.BestFit:
| Member | Meaning |
|---|---|
Link(x) |
|
InverseLink(eta) |
|
DLink(x) |
|
ToXElement() |
invariant-culture configuration serialization |
The direction is important: DLink is not
The following implementations come from RMC.Numerics 2.2.0 at commit 7e8e8d1c5f26e045a35ec9fc09367de95ed05b02.
| Class | Natural domain | |||
|---|---|---|---|---|
IdentityLink |
||||
LogLink |
||||
LogitLink |
||||
ProbitLink |
||||
ComplementaryLogLogLink |
||||
FisherZLink |
LogLink validates positivity and uses a positive numerical floor after validation. Probability links require the open unit interval and use interior clamps for stable inverse/derivative calculations. FisherZLink similarly requires the open correlation interval. A caller should treat domain exceptions or boundary saturation as a model-specification issue, not silently coerce a scientifically invalid value.
YeoJohnsonLink(lambda) supports all real
and
The constructor taking representative values estimates
CenteredLink(inner, mu0, scale) composes any link with an affine standardization. With
The inner link's domain applies to LogLink requires
private static (double LinkValue, double RoundTrip) TransformPositiveScale()
{
ILinkFunction positiveLink = new LogLink();
var centered = new CenteredLink(positiveLink, mu0: 0.0, scale: 100.0);
const double naturalScale = 250.0;
double linkValue = centered.Link(naturalScale);
double roundTrip = centered.InverseLink(linkValue);
return (linkValue, roundTrip);
}Here linkValue is roundTrip returns 250 to floating-point precision. Centering constants and scales are part of the scientific parameterization and must be serialized and reported.
ASinHLink adapts the sinh-arcsinh transformation of Jones and Pewsey 2 as a monotone link. Let
Then
and
The implementation floors UseAdaptiveEpsilon, it replaces the fixed skew parameter by
where ParentIndicator and EpsilonSlope. This is a deterministic coupling to the supplied parent indicator; it is not an independently fitted hierarchical relationship unless the consuming model estimates that indicator.
SESLink defines its inverse link analytically and computes its forward link numerically. With curvature
A is floored at A. Such settings do not define a globally invertible link, and Newton's returned value must not be interpreted as a unique inverse. This is an implementation limitation; the reference does not change the mapping. In adaptive mode,
before the effective-parameter clamp.
Link(x) solves Equation (10) by Newton iteration. Derivatives are floored at MaxIterations and Tolerance are configurable and serialized. The method returns its last iterate even if convergence fails, records LastInverseConverged and LastInverseResidual, and writes a debug diagnostic. Consumers must inspect convergence state when the transform is used in consequential calculations.
LogSESLink applies the SES mapping to relative log scale. Define
The forward link solves
LogASinHLink instead transforms the standardized log ratio
with inverse
and derivative
Both positive-scale links floor non-positive inputs internally to an epsilon. That protects finite differences; it does not make a negative physical scale valid. Validate the parent model before interpreting a transformed value.
- Use identity only for an unconstrained parameter whose regression can remain in valid support.
- Use log for strictly positive parameters when multiplicative change is interpretable.
- Use logit/probit/cloglog for probabilities, but state which link because equal linear predictors imply different tail behavior.
- Use Fisher
$z$ for correlations in$(-1,1)$ ; it does not guarantee that a matrix assembled from several correlations is positive definite. - Flexible ASinH/SES links add tuning constants and can trade off with regression coefficients. Fixing them without sensitivity analysis can understate structural uncertainty.
- Evaluate round-trip error
$|h^{-1}(h(x))-x|$ across the full fitted and extrapolation range, and compare analyticDLinkwith finite differences away from boundaries. - Large derivatives amplify uncertainty and optimization curvature. A finite inverse alone is not sufficient numerical validation.
BestFitLinkFunctionFactory.CreateFromXElement recognizes the five BestFit-specific link classes and delegates standard types to the Numerics factory. Legacy YeoJohnsonLink XML lacking a valid Lambda is restored as IdentityLink because the removed legacy implementation defaulted to identity behavior. The fallback writes a debug message; it does not throw. Peer-review archives should migrate and resave such projects so the effective transformation is explicit.
| Concern | Source of truth | Evidence |
|---|---|---|
| Standard links | Numerics link-function source at the pinned commit | Numerics link-function tests |
| ASinH, centered, SES variants | src/RMC.BestFit/Models/LinkFunctions/ |
src/RMC.BestFit.Tests/Models/LinkFunctions/ |
| XML compatibility | BestFitLinkFunctionFactory.cs |
factory and serialization unit tests |
| Compile-checked example | src/RMC.BestFit.Tests/Documentation/Examples/FoundationExamples.cs |
TechnicalReferenceDocumentationTests |
[1] I.-K. Yeo and R. A. Johnson, "A new family of power transformations to improve normality or symmetry," Biometrika, vol. 87, no. 4, pp. 954-959, 2000. doi: 10.1093/biomet/87.4.954.
[2] M. C. Jones and A. Pewsey, "Sinh-arcsinh distributions," Biometrika, vol. 96, no. 4, pp. 761-780, 2009. doi: 10.1093/biomet/asp053.
<- Trend functions | Technical reference index | Parameterization crosswalk ->