Skip to content

StdAggregation

StdAggregation(semi_grad: bool = False)

Bases: Aggregation

Feature-wise (population) standard deviation of the elements of each set.

\[ \mathrm{std}(\mathcal{X}) = \sqrt{\mathrm{var}(\mathcal{X})}. \]

As in PyG, the variance is clamped to \(10^{-5}\) before the square root, and standard deviations up to \(\sqrt{10^{-5}}\) are set to 0.

Parameters:

Name Type Description Default
semi_grad bool

See VarAggregation. Default: False

False
Source code in mlx_graphs/nn/aggr/basic.py
def __init__(self, semi_grad: bool = False):
    super().__init__()
    self.semi_grad = semi_grad

from mlx_graphs.nn.aggr import StdAggregation · mlx_graphs/nn/aggr/basic.py