Value Transforms

NonArchimedeanMachineLearning.sigmoid_transformMethod
sigmoid_transform(; scale=1.0, center=0.0)

Create a sigmoid value transform: loss → 1 / (1 + exp(scale * (loss - center))).

Low loss maps to high value (~1), high loss maps to low value (~0). The center parameter shifts the midpoint (where output = 0.5). The scale parameter controls the steepness of the transition.

Keyword Arguments

  • scale::Float64=1.0: Steepness of the sigmoid. Larger = sharper transition.
  • center::Float64=0.0: Loss value at which the output is 0.5.
source
NonArchimedeanMachineLearning.tanh_transformMethod
tanh_transform(; scale=1.0, center=0.0)

Create a tanh value transform: loss → (1 - tanh(scale * (loss - center))) / 2.

Rescaled to [0, 1] range. Low loss maps to high value (~1), high loss maps to low value (~0).

Keyword Arguments

  • scale::Float64=1.0: Steepness of the transition.
  • center::Float64=0.0: Loss value at which the output is 0.5.
source