split

package
v1.1.24 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: BSD-3-Clause Imports: 7 Imported by: 107

README

split

Docs: GoDoc

split provides GroupBy, Agg, Permute and other functions that create and populate Splits of etable.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 etable.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 Agg

func Agg(spl *etable.Splits, colNm string, aggTyp agg.Aggs) *etable.SplitAgg

Agg performs aggregation using given standard aggregation function 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 AggAllNumericCols added in v1.1.18

func AggAllNumericCols(spl *etable.Splits, aggTyp agg.Aggs)

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

func AggIdx

func AggIdx(spl *etable.Splits, colIdx int, aggTyp agg.Aggs) *etable.SplitAgg

AggIdx performs aggregation using given standard aggregation function across all splits, and returns the SplitAgg container of the results, which are also stored in the Splits. Column is specified by index.

func AggTry

func AggTry(spl *etable.Splits, colNm string, aggTyp agg.Aggs) (*etable.SplitAgg, error)

AggTry performs aggregation using given standard aggregation function 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 All

func All(ix *etable.IdxView) *etable.Splits

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

func Desc

func Desc(spl *etable.Splits, colNm string)

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

func DescIdx

func DescIdx(spl *etable.Splits, colIdx int)

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

func DescTry

func DescTry(spl *etable.Splits, colNm string) error

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

func GroupBy

func GroupBy(ix *etable.IdxView, colNms []string) *etable.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 *etable.IdxView, fun func(row int) []string) *etable.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 GroupByIdx

func GroupByIdx(ix *etable.IdxView, colIdxs []int) *etable.Splits

GroupByIdx 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 GroupByTry

func GroupByTry(ix *etable.IdxView, colNms []string) (*etable.Splits, error)

GroupByTry returns a new Splits set based on the groups of values across the given set of column names. returns error for bad column names. Uses a stable sort on columns, so ordering of other dimensions is preserved.

func Permuted

func Permuted(ix *etable.IdxView, probs []float64, names []string) (*etable.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