MCPcopy Create free account
hub / github.com/OpenDriveLab/TCP / set_noise

Method set_noise

roach/utils/expert_noiser.py:26–35  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

24 self.current_noise_mean = 0
25
26 def set_noise(self):
27
28 if self.noise_type == 'Spike' or self.noise_type == 'Throttle':
29
30 # flip between positive and negative
31 coin = random.randint(0, 1)
32 if coin == 0: # negative
33 self.current_noise_mean = 0.001 # -random.gauss(0.05,0.02)
34 else: # positive
35 self.current_noise_mean = -0.001 # random.gauss(0.05,0.02)
36
37 def get_noise(self):
38

Callers 1

is_time_for_noiseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected