MCPcopy Create free account
hub / github.com/cogentcore/core / AggColumnTry

Function AggColumnTry

tensor/stats/split/agg.go:40–50  ·  view source on GitHub ↗

AggColumnTry performs aggregation using given standard statistic (e.g., Mean) across all splits, and returns the SplitAgg container of the results, which are also stored in the Splits. Column is specified by name -- returns error for bad column name.

(spl *table.Splits, column string, stat stats.Stats)

Source from the content-addressed store, hash-verified

38// all splits, and returns the SplitAgg container of the results, which are also
39// stored in the Splits. Column is specified by name -- returns error for bad column name.
40func AggColumnTry(spl *table.Splits, column string, stat stats.Stats) (*table.SplitAgg, error) {
41 dt := spl.Table()
42 if dt == nil {
43 return nil, fmt.Errorf("split.AggTry: No splits to aggregate over")
44 }
45 colIndex, err := dt.ColumnIndexTry(column)
46 if err != nil {
47 return nil, err
48 }
49 return AggIndex(spl, colIndex, stat), nil
50}
51
52// AggAllNumericCols performs aggregation using given standard aggregation function across
53// all splits, for all number-valued columns in the table.

Callers

nothing calls this directly

Calls 4

AggIndexFunction · 0.85
TableMethod · 0.80
ColumnIndexTryMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected