Documentation ¶
Overview ¶
Package agg provides aggregation functions operating on IdxView indexed views of etable.Table data, along with standard AggFunc functions that can be used at any level of aggregation from etensor on up.
The main functions use names to specify columns, and *Idx and *Try versions are available that operate on column indexes and return errors, respectively.
Index ¶
- Variables
- func Agg(ix *etable.IdxView, colNm string, ag Aggs) []float64
- func AggIdx(ix *etable.IdxView, colIdx int, ag Aggs) []float64
- func AggTry(ix *etable.IdxView, colNm string, ag Aggs) ([]float64, error)
- func AggsName(ag Aggs) string
- func Count(ix *etable.IdxView, colNm string) []float64
- func CountFunc(idx int, val float64, ag float64) float64
- func CountIdx(ix *etable.IdxView, colIdx int) []float64
- func CountIf(ix *etable.IdxView, colNm string, iffun IfFunc) []float64
- func CountIfIdx(ix *etable.IdxView, colIdx int, iffun IfFunc) []float64
- func CountIfTry(ix *etable.IdxView, colNm string, iffun IfFunc) ([]float64, error)
- func CountTry(ix *etable.IdxView, colNm string) ([]float64, error)
- func Desc(ix *etable.IdxView, colNm string) *etable.Table
- func DescAll(ix *etable.IdxView) *etable.Table
- func DescIdx(ix *etable.IdxView, colIdx int) *etable.Table
- func DescTry(ix *etable.IdxView, colNm string) (*etable.Table, error)
- func Max(ix *etable.IdxView, colNm string) []float64
- func MaxFunc(idx int, val float64, ag float64) float64
- func MaxIdx(ix *etable.IdxView, colIdx int) []float64
- func MaxTry(ix *etable.IdxView, colNm string) ([]float64, error)
- func Mean(ix *etable.IdxView, colNm string) []float64
- func MeanIdx(ix *etable.IdxView, colIdx int) []float64
- func MeanTables(dts []*etable.Table) *etable.Table
- func MeanTry(ix *etable.IdxView, colNm string) ([]float64, error)
- func Median(ix *etable.IdxView, colNm string) []float64
- func MedianIdx(ix *etable.IdxView, colIdx int) []float64
- func MedianTry(ix *etable.IdxView, colNm string) ([]float64, error)
- func Min(ix *etable.IdxView, colNm string) []float64
- func MinFunc(idx int, val float64, ag float64) float64
- func MinIdx(ix *etable.IdxView, colIdx int) []float64
- func MinTry(ix *etable.IdxView, colNm string) ([]float64, error)
- func PctIf(ix *etable.IdxView, colNm string, iffun IfFunc) []float64
- func PctIfIdx(ix *etable.IdxView, colIdx int, iffun IfFunc) []float64
- func PctIfTry(ix *etable.IdxView, colNm string, iffun IfFunc) ([]float64, error)
- func Prod(ix *etable.IdxView, colNm string) []float64
- func ProdFunc(idx int, val float64, ag float64) float64
- func ProdIdx(ix *etable.IdxView, colIdx int) []float64
- func ProdTry(ix *etable.IdxView, colNm string) ([]float64, error)
- func PropIf(ix *etable.IdxView, colNm string, iffun IfFunc) []float64
- func PropIfIdx(ix *etable.IdxView, colIdx int, iffun IfFunc) []float64
- func PropIfTry(ix *etable.IdxView, colNm string, iffun IfFunc) ([]float64, error)
- func Q1(ix *etable.IdxView, colNm string) []float64
- func Q1Idx(ix *etable.IdxView, colIdx int) []float64
- func Q1Try(ix *etable.IdxView, colNm string) ([]float64, error)
- func Q3(ix *etable.IdxView, colNm string) []float64
- func Q3Idx(ix *etable.IdxView, colIdx int) []float64
- func Q3Try(ix *etable.IdxView, colNm string) ([]float64, error)
- func Quantiles(ix *etable.IdxView, colNm string, qs []float64) []float64
- func QuantilesIdx(ix *etable.IdxView, colIdx int, qs []float64) []float64
- func QuantilesTry(ix *etable.IdxView, colNm string, qs []float64) ([]float64, error)
- func Sem(ix *etable.IdxView, colNm string) []float64
- func SemIdx(ix *etable.IdxView, colIdx int) []float64
- func SemPop(ix *etable.IdxView, colNm string) []float64
- func SemPopIdx(ix *etable.IdxView, colIdx int) []float64
- func SemPopTry(ix *etable.IdxView, colNm string) ([]float64, error)
- func SemTry(ix *etable.IdxView, colNm string) ([]float64, error)
- func Std(ix *etable.IdxView, colNm string) []float64
- func StdIdx(ix *etable.IdxView, colIdx int) []float64
- func StdPop(ix *etable.IdxView, colNm string) []float64
- func StdPopIdx(ix *etable.IdxView, colIdx int) []float64
- func StdPopTry(ix *etable.IdxView, colNm string) ([]float64, error)
- func StdTry(ix *etable.IdxView, colNm string) ([]float64, error)
- func Sum(ix *etable.IdxView, colNm string) []float64
- func SumFunc(idx int, val float64, ag float64) float64
- func SumIdx(ix *etable.IdxView, colIdx int) []float64
- func SumSq(ix *etable.IdxView, colNm string) []float64
- func SumSqFunc(idx int, val float64, ag float64) float64
- func SumSqIdx(ix *etable.IdxView, colIdx int) []float64
- func SumSqTry(ix *etable.IdxView, colNm string) ([]float64, error)
- func SumTry(ix *etable.IdxView, colNm string) ([]float64, error)
- func Var(ix *etable.IdxView, colNm string) []float64
- func VarIdx(ix *etable.IdxView, colIdx int) []float64
- func VarPop(ix *etable.IdxView, colNm string) []float64
- func VarPopIdx(ix *etable.IdxView, colIdx int) []float64
- func VarPopTry(ix *etable.IdxView, colNm string) ([]float64, error)
- func VarTry(ix *etable.IdxView, colNm string) ([]float64, error)
- type Aggs
- type IdxViewAggFunc
- type IdxViewAggFuncIdx
- type IdxViewAggFuncTry
- type IfFunc
Constants ¶
This section is empty.
Variables ¶
var DescAggs = []Aggs{AggCount, AggMean, AggStd, AggSem, AggMin, AggQ1, AggMedian, AggQ3, AggMax}
DescAggs are all the standard aggregates
DescAggsND are all the standard aggregates for n-dimensional (n > 1) data -- cannot do quantiles
var KiT_Aggs = kit.Enums.AddEnum(AggsN, kit.NotBitFlag, nil)
Functions ¶
func Agg ¶
Agg returns aggregate according to given agg type applied to all non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. valid names are: Count, Sum, Var, Std, Sem, VarPop, StdPop, SemPop, Min, Max, SumSq (case insensitive) If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func AggIdx ¶
AggIdx returns aggregate according to given agg type applied to all non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. valid names are: Count, Sum, Var, Std, Sem, VarPop, StdPop, SemPop, Min, Max, SumSq, 25%, 1Q, Median, 50%, 2Q, 75%, 3Q (case insensitive) Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func AggTry ¶
AggTry returns aggregate according to given agg type applied to all non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. valid names are: Count, Sum, Var, Std, Sem, VarPop, StdPop, SemPop, Min, Max, SumSq (case insensitive) If col name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Count ¶
Count returns the count of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func CountFunc ¶
CountFunc is an AggFunc that computes number of elements (non-Null, non-NaN) Use 0 as initial value.
func CountIdx ¶
CountIdx returns the count of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func CountIf ¶
CountIf returns the count of true return values for given IfFunc on non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func CountIfIdx ¶
CountIfIdx returns the count of true return values for given IfFunc on non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func CountIfTry ¶
CountIfTry returns the count of true return values for given IfFunc on non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func CountTry ¶
CountTry returns the count of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Desc ¶
Desc returns a table of standard descriptive aggregates of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message.
func DescAll ¶
DescAll returns a table of standard descriptive aggregates for all numeric columns in given table, operating over all non-Null, non-NaN elements in each column.
func DescIdx ¶
DescIdx returns a table of standard descriptive aggregates of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index.
func DescTry ¶
Desc returns a table of standard descriptive aggregate aggs of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Max ¶
Max returns the maximum of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func MaxFunc ¶
MaxFunc is an AggFunc that computes a max aggregate. use -math.MaxFloat64 for initial agg value.
func MaxIdx ¶
MaxIdx returns the maximum of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func MaxTry ¶
MaxTry returns the maximum of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Mean ¶
Mean returns the mean of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func MeanIdx ¶
MeanIdx returns the mean of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func MeanTables ¶ added in v1.0.44
MeanTables returns an etable.Table with the mean values across all float columns of the input tables, which must have the same columns but not necessarily the same number of rows.
func MeanTry ¶
MeanTry returns the mean of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Median ¶
Median returns the median of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func MedianIdx ¶
MedianIdx returns the median of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func MedianTry ¶
MedianTry returns the median of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Min ¶
Min returns the minimum of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func MinFunc ¶
MinFunc is an AggFunc that computes a min aggregate. use math.MaxFloat64 for initial agg value.
func MinIdx ¶
MinIdx returns the minimum of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func MinTry ¶
MinTry returns the minimum of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func PctIf ¶
PctIf returns the percentage (0-100) of true return values for given IfFunc on non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func PctIfIdx ¶
PctIfIdx returns the percentage (0-100) of true return values for given IfFunc on non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func PctIfTry ¶
PctIfTry returns the percentage (0-100) of true return values for given IfFunc on non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Prod ¶
Prod returns the product of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func ProdIdx ¶
ProdIdx returns the product of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func ProdTry ¶
ProdTry returns the product of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func PropIf ¶
PropIf returns the proportion (0-1) of true return values for given IfFunc on non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func PropIfIdx ¶
PropIfIdx returns the proportion (0-1) of true return values for given IfFunc on non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func PropIfTry ¶
PropIfTry returns the proportion (0-1) of true return values for given IfFunc on non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Q1 ¶
Q1 returns the first quartile of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Q1Idx ¶
Q1Idx returns the first quartile of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Q1Try ¶
Q1Try returns the first quartile of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Q3 ¶
Q3 returns the third quartile of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Q3Idx ¶
Q3Idx returns the third quartile of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Q3Try ¶
Q3Try returns the third quartile of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Quantiles ¶
Quantiles returns the given quantile(s) of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message. Column must be a 1d Column -- returns nil for n-dimensional columns. qs are 0-1 values, 0 = min, 1 = max, .5 = median, etc. Uses linear interpolation. Because this requires a sort, it is more efficient to get as many quantiles as needed in one pass.
func QuantilesIdx ¶
QuantilesIdx returns the given quantile(s) of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Column must be a 1d Column -- returns nil for n-dimensional columns. qs are 0-1 values, 0 = min, 1 = max, .5 = median, etc. Uses linear interpolation. Because this requires a sort, it is more efficient to get as many quantiles as needed in one pass.
func QuantilesTry ¶
QuantilesTry returns the given quantile(s) of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name If name not found, error message is returned. Column must be a 1d Column -- returns nil for n-dimensional columns. qs are 0-1 values, 0 = min, 1 = max, .5 = median, etc. Uses linear interpolation. Because this requires a sort, it is more efficient to get as many quantiles as needed in one pass.
func Sem ¶
Sem returns the sample standard error of the mean of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. Sample sem is normalized by 1/(n-1) -- see SemPop version for 1/n normalization. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func SemIdx ¶
SemIdx returns the sample standard error of the mean of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Sample sem is normalized by 1/(n-1) -- see SemPop version for 1/n normalization. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func SemPop ¶
SemPop returns the standard error of the mean of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. population sem is normalized by 1/n -- see Var version for 1/(n-1) sample normalization. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func SemPopIdx ¶
SemPopIdx returns the population standard error of the mean of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. population sem is normalized by 1/n -- see Var version for 1/(n-1) sample normalization. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func SemPopTry ¶
SemPopTry returns the standard error of the mean of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. population sem is normalized by 1/n -- see Var version for 1/(n-1) sample normalization. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func SemTry ¶
SemTry returns the sample standard error of the mean of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. Sample sem is normalized by 1/(n-1) -- see SemPop version for 1/n normalization. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Std ¶
Std returns the sample std deviation of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. Sample std deviation is normalized by 1/(n-1) -- see StdPop version for 1/n normalization. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func StdIdx ¶
StdIdx returns the sample std deviation of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Sample std deviation is normalized by 1/(n-1) -- see StdPop version for 1/n normalization. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func StdPop ¶
StdPop returns the population std deviation of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. population std dev is normalized by 1/n -- see Var version for 1/(n-1) sample normalization. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func StdPopIdx ¶
StdPopIdx returns the population std deviation of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. population std dev is normalized by 1/n -- see Var version for 1/(n-1) sample normalization. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func StdPopTry ¶
StdPopTry returns the population std deviation of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. population std dev is normalized by 1/n -- see Var version for 1/(n-1) sample normalization. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func StdTry ¶
StdTry returns the sample std deviation of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. Sample std deviation is normalized by 1/(n-1) -- see StdPop version for 1/n normalization. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Sum ¶
Sum returns the sum of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func SumIdx ¶
SumIdx returns the sum of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func SumSq ¶
SumSq returns the sum-of-squares of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func SumSqFunc ¶
SumSqFunc is an AggFunc that computes a sum-of-squares aggregate. use 0 as initial value.
func SumSqIdx ¶
SumSqIdx returns the sum-of-squares of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func SumSqTry ¶
SumSqTry returns the sum-of-squares of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func SumTry ¶
SumTry returns the sum of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func Var ¶
Var returns the sample variance of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. Sample variance is normalized by 1/(n-1) -- see VarPop version for 1/n normalization. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func VarIdx ¶
VarIdx returns the sample variance of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. Sample variance is normalized by 1/(n-1) -- see VarPop version for 1/n normalization. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func VarPop ¶
VarPop returns the population variance of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. population variance is normalized by 1/n -- see Var version for 1/(n-1) sample normalization. If name not found, nil is returned -- use Try version for error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func VarPopIdx ¶
VarPopIdx returns the population variance of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column index. population variance is normalized by 1/n -- see Var version for 1/(n-1) sample normalization. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func VarPopTry ¶
VarPopTry returns the population variance of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. population variance is normalized by 1/n -- see Var version for 1/(n-1) sample normalization. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
func VarTry ¶
VarTry returns the sample variance of non-Null, non-NaN elements in given IdxView indexed view of an etable.Table, for given column name. Sample variance is normalized by 1/(n-1) -- see VarPop version for 1/n normalization. If name not found, returns error message. Return value is size of each column cell -- 1 for scalar 1D columns and N for higher-dimensional columns.
Types ¶
type Aggs ¶
type Aggs int
Aggs is a list of different standard aggregation functions, which can be used to choose an aggregation function
const ( // Count of number of elements AggCount Aggs = iota // Sum of elements AggSum // Product of elements AggProd // Min minimum value AggMin // Max maximum value AggMax // Mean mean value AggMean // Var sample variance (squared diffs from mean, divided by n-1) AggVar // Std sample standard deviation (sqrt of Var) AggStd // Sem sample standard error of the mean (Std divided by sqrt(n)) AggSem // VarPop population variance (squared diffs from mean, divided by n) AggVarPop // StdPop population standard deviation (sqrt of VarPop) AggStdPop // SemPop population standard error of the mean (StdPop divided by sqrt(n)) AggSemPop // Median middle value in sorted ordering AggMedian // Q1 first quartile = 25%ile value = .25 quantile value AggQ1 // Q3 third quartile = 75%ile value = .75 quantile value AggQ3 // SumSq sum of squares AggSumSq AggsN )
func (*Aggs) FromString ¶
func (Aggs) MarshalJSON ¶
func (*Aggs) UnmarshalJSON ¶
type IdxViewAggFunc ¶
IdxViewAggFunc is an aggregation function operating on IdxView, taking a column name arg
type IdxViewAggFuncIdx ¶
IdxViewAggFuncIdx is an aggregation function operating on IdxView, taking a column index arg
type IdxViewAggFuncTry ¶
IdxViewAggFuncTry is an aggregation function operating on IdxView, taking a column name arg, returning an error message