MCPcopy Create free account
hub / github.com/bic-L/MaxFormer / random_drop

Method random_drop

event/augment.py:205–210  ·  view source on GitHub ↗
(self, events, ratio)

Source from the content-addressed store, hash-verified

203 return events
204
205 def random_drop(self, events, ratio):
206 events = copy.deepcopy(events)
207 N = events.shape[0]
208 num_drop = int(N * ratio)
209 idx = random.sample(list(np.arange(0, N)), N - num_drop)
210 return events[idx]
211
212 def drop_by_area_with_cam(self, events, area_ratio):
213 events = copy.deepcopy(events)

Callers 1

event_dropMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected