Boundary transformations¶
-
class
pints.
TriangleWaveTransform
(boundaries)[source]¶ Transforms from unbounded to (rectangular) bounded parameter space using a periodic triangle-wave transform.
Note: The transform is applied _inside_ optimisation methods, there is no need to wrap this around your own problem or score function.
This can be applied as a transformation on
x
to implement _rectangular_ boundaries in methods with no natural boundary mechanism. It effectively mirrors the search space at every boundary, leading to a continuous (but non-smooth) periodic landscape. While this effectively creates an infinite number of minima/maxima, each one maps to the same point in parameter space.It should work well for methods that maintain a single search position or a single search distribution (e.g.
CMAES
,xNES
,SNES
), which will end up in one of the many mirror images. However, for methods that use independent search particles (e.g.PSO
) it could lead to a scattered population, with different particles exploring different mirror images. Other strategies should be used for such problems.