Skip to content

RandomJitter

RandomJitter(translate: Union[float, Sequence[float]])

Bases: BaseTransform

Translates each node position pos by a random offset, sampled uniformly from \([-t, t]\) in each dimension (with mx.random).

Parameters:

Name Type Description Default
translate Union[float, Sequence[float]]

The maximum translation \(t\), for all dimensions or for each of them.

required

Example:

from mlx_graphs.transforms import RandomJitter

graph = RandomJitter(0.01)(graph)
Source code in mlx_graphs/transforms/point_cloud.py
def __init__(self, translate: Union[float, Sequence[float]]):
    self.translate = translate

from mlx_graphs.transforms import RandomJitter · mlx_graphs/transforms/point_cloud.py