bartorch.tools.noise

Contents

bartorch.tools.noise#

bartorch.tools.noise(input, *, s=None, S=None, r=False, n=None, uniform=False, **extra)#

Add noise with selected variance to input.

Runs bart noise.

Parameters:
  • input (torch.Tensor) – Input array.

  • s (int | None) – random seed initialization. ‘0’ uses the default seed. (-s)

  • S (float | None) – () (-S)

  • r (bool) – real-valued input (-r)

  • n (float | None) – DEFAULT: 1.0 (-n)

  • uniform (bool) – select uniform noise distribution (--uniform)

  • **extra (Any) – Further BART flags, passed through by name.

Returns:

output

Return type:

torch.Tensor