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

Function skewness

pattern/metrics.py:605–613  ·  view source on GitHub ↗

Returns the degree of asymmetry of the given list of values: > 0.0 => relatively few values are higher than mean(list), < 0.0 => relatively few values are lower than mean(list), = 0.0 => evenly distributed on both sides of the mean (= normal distribution).

(list)

Source from the content-addressed store, hash-verified

603 return sum([(x-m)**k for x in list]) / (len(list) or 1)
604
605def skewness(list):
606 """ Returns the degree of asymmetry of the given list of values:
607 > 0.0 => relatively few values are higher than mean(list),
608 < 0.0 => relatively few values are lower than mean(list),
609 = 0.0 => evenly distributed on both sides of the mean (= normal distribution).
610 """
611 # Distributions with skew and kurtosis between -1 and +1
612 # can be considered normal by approximation.
613 return moment(list, 3) / (moment(list, 2) ** 1.5 or 1)
614
615skew = skewness
616

Callers

nothing calls this directly

Calls 1

momentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…