RandomTree#

class sdm.prior.RandomTree(num_trees: HP[int] | int, depth: HP[int] | int)#

Bases: RandomFunction

Average the outputs of random symmetric trees.

Parameters:
  • num_trees (HP[int] | int) – Number of trees in the ensemble.

  • depth (HP[int] | int) – Depth of each symmetric tree.

forward(x: Tensor, out_channels: int, generator: Generator | None = None) → Tensor#

Apply a sampled function to every row of x.

Parameters:
  • x (Tensor) – Input values with shape [R, H] for rows and channels.

  • out_channels (int) – Number of output channels.

  • generator (Generator | None) – Pseudorandom generator.

Returns:

Node values with shape [R, out_channels].

Return type:

Tensor