MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / randomize

Method randomize

monai/apps/deepgrow/transforms.py:290–292  ·  view source on GitHub ↗
(self, data=None)

Source from the content-addressed store, hash-verified

288 self._will_interact = None
289
290 def randomize(self, data=None):
291 probability = data[self.probability]
292 self._will_interact = self.R.choice([True, False], p=[probability, 1.0 - probability])
293
294 def find_guidance(self, discrepancy):
295 distance = distance_transform_cdt(discrepancy).flatten()

Callers 1

__call__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected