# torch_geometric.transforms.RandomShear

class RandomShear(shear: )[source]

Bases: BaseTransform

Shears node positions by randomly sampled factors $$s$$ within a given interval, e.g., resulting in the transformation matrix (functional name: random_shear)

$\begin{split}\begin{bmatrix} 1 & s_{xy} & s_{xz} \\ s_{yx} & 1 & s_{yz} \\ s_{zx} & z_{zy} & 1 \\ \end{bmatrix}\end{split}$

for three-dimensional positions.

Parameters

shear (float or int) – maximum shearing factor defining the range $$(-\mathrm{shear}, +\mathrm{shear})$$ to sample from.