colosseum.noises.gaussian_uncorrelated

 1from typing import Callable, List
 2
 3import numpy as np
 4
 5from colosseum.noises.base import Noise
 6
 7
 8class GaussianUncorrelated(Noise):
 9    """
10    The class that creates Gaussian uncorrelated noise.
11    """
12
13    def _sample_noise(self, n: int) -> np.ndarray:
14        return self._rng.normal(loc=0, scale=self._scale, size=(n, *self.shape))
15
16    def __init__(self, seed: int, shape_f: Callable[[], List[int]], scale: float = 0.1):
17        """
18        Parameters
19        ----------
20        seed : int
21            The random seed.
22        shape_f : Callable[[], List[int]]
23            The function that returns the shape of the emission map.
24        scale : float
25            The scale parameter for Gaussian noise. By default, it is 0.1.
26        """
27        super(GaussianUncorrelated, self).__init__(seed, shape_f)
28
29        self._scale = scale
class GaussianUncorrelated(colosseum.noises.base.Noise):
 9class GaussianUncorrelated(Noise):
10    """
11    The class that creates Gaussian uncorrelated noise.
12    """
13
14    def _sample_noise(self, n: int) -> np.ndarray:
15        return self._rng.normal(loc=0, scale=self._scale, size=(n, *self.shape))
16
17    def __init__(self, seed: int, shape_f: Callable[[], List[int]], scale: float = 0.1):
18        """
19        Parameters
20        ----------
21        seed : int
22            The random seed.
23        shape_f : Callable[[], List[int]]
24            The function that returns the shape of the emission map.
25        scale : float
26            The scale parameter for Gaussian noise. By default, it is 0.1.
27        """
28        super(GaussianUncorrelated, self).__init__(seed, shape_f)
29
30        self._scale = scale

The class that creates Gaussian uncorrelated noise.

GaussianUncorrelated(seed: int, shape_f: Callable[[], List[int]], scale: float = 0.1)
17    def __init__(self, seed: int, shape_f: Callable[[], List[int]], scale: float = 0.1):
18        """
19        Parameters
20        ----------
21        seed : int
22            The random seed.
23        shape_f : Callable[[], List[int]]
24            The function that returns the shape of the emission map.
25        scale : float
26            The scale parameter for Gaussian noise. By default, it is 0.1.
27        """
28        super(GaussianUncorrelated, self).__init__(seed, shape_f)
29
30        self._scale = scale
Parameters
  • seed (int): The random seed.
  • shape_f (Callable[[], List[int]]): The function that returns the shape of the emission map.
  • scale (float): The scale parameter for Gaussian noise. By default, it is 0.1.