MCPcopy Index your code
hub / github.com/ray-project/ray / _basic_aggregators

Function _basic_aggregators

python/ray/data/stats.py:259–277  ·  view source on GitHub ↗

Generate default metrics for all columns. This function returns a list of aggregators that compute the following metrics: - count - missing_value_percentage - approximate_top_k (top 10 most frequent values) Args: column: The name of the column to compute metrics for.

(column: str)

Source from the content-addressed store, hash-verified

257
258
259def _basic_aggregators(column: str) -> List[AggregateFnV2]:
260 """Generate default metrics for all columns.
261
262 This function returns a list of aggregators that compute the following metrics:
263 - count
264 - missing_value_percentage
265 - approximate_top_k (top 10 most frequent values)
266
267 Args:
268 column: The name of the column to compute metrics for.
269
270 Returns:
271 A list of AggregateFnV2 instances that can be used with Dataset.aggregate()
272 """
273 return [
274 Count(on=column, ignore_nulls=False),
275 MissingValuePercentage(on=column),
276 ApproximateTopK(on=column, k=10),
277 ]
278
279
280def _default_dtype_aggregators() -> Dict[

Callers 2

Calls 3

CountClass · 0.90
ApproximateTopKClass · 0.90

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…