1from typing import Callable, List
2
3import numpy as np
4
5from colosseum.noises.base import Noise
6
7
8class StudentTUncorrelated(Noise):
9 """
10 The class that creates Student's t uncorrelated noise.
11 """
12
13 def _sample_noise(self, n: int) -> np.ndarray:
14 return self._rng.standard_t(self._df, *self.shape)
15
16 def __init__(self, seed: int, shape_f: Callable[[], List[int]], df: float = 3):
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 df : int
25 The degree of freedom of the Student's t distribution.
26 """
27 super(StudentTUncorrelated, self).__init__(seed, shape_f)
28
29 self._df = df