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

Method baseline

pattern/vector/__init__.py:1723–1729  ·  view source on GitHub ↗

Yields the most frequent class in the training data, or a user-defined class if Classifier(baseline != FREQUENCY).

(self)

Source from the content-addressed store, hash-verified

1721
1722 @property
1723 def baseline(self):
1724 """ Yields the most frequent class in the training data,
1725 or a user-defined class if Classifier(baseline != FREQUENCY).
1726 """
1727 if self._baseline != FREQUENCY:
1728 return self._baseline
1729 return ([(0, None)] + sorted([(v, k) for k, v in self._classes.iteritems()]))[-1][1]
1730
1731 @property
1732 def skewness(self):

Callers

nothing calls this directly

Calls 1

iteritemsMethod · 0.80

Tested by

no test coverage detected