turicreate.Sketch.frequent_items

Sketch.frequent_items()

Returns a sketched estimate of the most frequent elements in the SArray based on the SpaceSaving sketch. It is only guaranteed that all elements which appear in more than 0.01% rows of the array will appear in the set of returned elements. However, other elements may also appear in the result. The item counts are estimated using the CountSketch.

Missing values are not taken into account when computing frequent items.

If this function returns no elements, it means that all elements appear with less than 0.01% occurrence.

Returns:
out : dict

A dictionary mapping items and their estimated occurrence frequencies.