MCPcopy Create free account
hub / github.com/Atrovast/THGS / __init__

Method __init__

ext/spt/transforms/sampling.py:543–548  ·  view source on GitHub ↗
(self, ratio=0.2, by_size=False, by_class=False)

Source from the content-addressed store, hash-verified

541 _OUT_TYPE = NAG
542
543 def __init__(self, ratio=0.2, by_size=False, by_class=False):
544 assert isinstance(ratio, list) and all(0 <= r < 1 for r in ratio) \
545 or (0 <= ratio < 1)
546 self.ratio = ratio
547 self.by_size = by_size
548 self.by_class = by_class
549
550 def _process(self, nag):
551 if not isinstance(self.ratio, list):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected