MCPcopy Index your code
hub / github.com/clips/pattern / majority

Method majority

pattern/vector/__init__.py:1709–1713  ·  view source on GitHub ↗

Yields the majority class (= most frequent class).

(self)

Source from the content-addressed store, hash-verified

1707
1708 @property
1709 def majority(self):
1710 """ Yields the majority class (= most frequent class).
1711 """
1712 d = sorted((v, k) for k, v in self._classes.iteritems())
1713 return d and d[-1][1] or None
1714
1715 @property
1716 def minority(self):

Callers

nothing calls this directly

Calls 1

iteritemsMethod · 0.80

Tested by

no test coverage detected