split

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

README

split

split provides GroupBy, Agg, Permute and other functions that create and populate Splits of table.Table data. These are powerful tools for quickly summarizing and analyzing data.

Documentation

Overview

Package split provides GroupBy, Agg, Permute and other functions that create and populate Splits of table.Table data. These are powerful tools for quickly summarizing and analyzing data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggAllNumericCols

func AggAllNumericCols(spl *table.Splits, stat stats.Stats)

AggAllNumericCols performs aggregation using given standard aggregation function across all splits, for all number-valued columns in the table.

func AggColumn

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

AggColumn 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 -- see Try for error msg version.

func AggColumnTry

func AggColumnTry(spl *table.Splits, column string, stat stats.Stats) (*table.SplitAgg, error)

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.

func AggIndex

func AggIndex(spl *table.Splits, colIndex int, stat stats.Stats) *table.SplitAgg

AggIndex 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 index.

func All

func All(ix *table.IndexView) *table.Splits

All returns a single "split" with all of the rows in given view useful for leveraging the aggregation management functions in splits

func DescColumn

func DescColumn(spl *table.Splits, column string)

DescColumn performs aggregation using standard statistics across all splits, and stores results in the Splits. Column is specified by name -- see Try for error msg version.

func DescColumnTry

func DescColumnTry(spl *table.Splits, column string) error

DescColumnTry performs aggregation using standard statistics across all splits, and stores results in the Splits. Column is specified by name -- returns error for bad column name.

func DescIndex

func DescIndex(spl *table.Splits, colIndex int)

DescIndex performs aggregation using standard statistics across all splits, and stores results in the Splits. Column is specified by index.

func GroupBy

func GroupBy(ix *table.IndexView, columns []string) *table.Splits

GroupBy returns a new Splits set based on the groups of values across the given set of column names (see Try for version with error) Uses a stable sort on columns, so ordering of other dimensions is preserved.

func GroupByFunc

func GroupByFunc(ix *table.IndexView, fun func(row int) []string) *table.Splits

GroupByFunc returns a new Splits set based on the given function which returns value(s) to group on for each row of the table. The function should always return the same number of values -- if it doesn't behavior is undefined. Uses a stable sort on columns, so ordering of other dimensions is preserved.

func GroupByIndex

func GroupByIndex(ix *table.IndexView, colIndexes []int) *table.Splits

GroupByIndex returns a new Splits set based on the groups of values across the given set of column indexes. Uses a stable sort on columns, so ordering of other dimensions is preserved.

func Permuted

func Permuted(ix *table.IndexView, probs []float64, names []string) (*table.Splits, error)

Permuted generates permuted random splits of table rows, using given list of probabilities, which will be normalized to sum to 1 (error returned if sum = 0) names are optional names for each split (e.g., Train, Test) which will be used to label the Values of the resulting Splits.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL