Customize weight-updating within factor levels in case of numerical calibration. The functions described here serve as inputs for ipu2.
computeFrac(curValue, target, x, w)computeLinear(curValue, target, x, w, boundLinear = 10)
Current summed up value. Same as sum(x*w)
Target value. An element of conP
in ipu2
Vector of numeric values to be calibrated against
Vector of weights
The output f
will satisfy 1/boundLinear <= f <= boundLinear
. See bound
in ipu2
A weight multiplier f
computeFrac
provides the "standard" IPU updating scheme given as
$$f = target/curValue$$
which means that each weight inside the level will be multtiplied by the same factor when
doing the actual update step (w := f*w
). computeLinear
on the other hand
calculates f
as
where a
and b
are chosen, so f satisfies the following two equations.