Documentation ¶
Overview ¶
Package agg provides aggregation functions operating on IndexView 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 *Index and *Try versions are available that operate on column indexes and return errors, respectively.
See tsragg package for functions that operate directly on a etensor.Tensor without the indexview indirection.
Index ¶
- Variables
- func Agg(ix *etable.IndexView, colNm string, ag Aggs) []float64
- func AggIndex(ix *etable.IndexView, colIndex int, ag Aggs) []float64
- func AggTry(ix *etable.IndexView, colNm string, ag Aggs) ([]float64, error)
- func AggsName(ag Aggs) string
- func Count(ix *etable.IndexView, colNm string) []float64
- func CountFunc(idx int, val float64, ag float64) float64
- func CountIf(ix *etable.IndexView, colNm string, iffun IfFunc) []float64
- func CountIfIndex(ix *etable.IndexView, colIndex int, iffun IfFunc) []float64
- func CountIfTry(ix *etable.IndexView, colNm string, iffun IfFunc) ([]float64, error)
- func CountIndex(ix *etable.IndexView, colIndex int) []float64
- func CountTry(ix *etable.IndexView, colNm string) ([]float64, error)
- func Desc(ix *etable.IndexView, colNm string) *etable.Table
- func DescAll(ix *etable.IndexView) *etable.Table
- func DescIndex(ix *etable.IndexView, colIndex int) *etable.Table
- func DescTry(ix *etable.IndexView, colNm string) (*etable.Table, error)
- func Max(ix *etable.IndexView, colNm string) []float64
- func MaxFunc(idx int, val float64, ag float64) float64
- func MaxIndex(ix *etable.IndexView, colIndex int) []float64
- func MaxTry(ix *etable.IndexView, colNm string) ([]float64, error)
- func Mean(ix *etable.IndexView, colNm string) []float64
- func MeanIndex(ix *etable.IndexView, colIndex int) []float64
- func MeanTables(dts []*etable.Table) *etable.Table
- func MeanTry(ix *etable.IndexView, colNm string) ([]float64, error)
- func Median(ix *etable.IndexView, colNm string) []float64
- func MedianIndex(ix *etable.IndexView, colIndex int) []float64
- func MedianTry(ix *etable.IndexView, colNm string) ([]float64, error)
- func Min(ix *etable.IndexView, colNm string) []float64
- func MinFunc(idx int, val float64, ag float64) float64
- func MinIndex(ix *etable.IndexView, colIndex int) []float64
- func MinTry(ix *etable.IndexView, colNm string) ([]float64, error)
- func PctIf(ix *etable.IndexView, colNm string, iffun IfFunc) []float64
- func PctIfIndex(ix *etable.IndexView, colIndex int, iffun IfFunc) []float64
- func PctIfTry(ix *etable.IndexView, colNm string, iffun IfFunc) ([]float64, error)
- func Prod(ix *etable.IndexView, colNm string) []float64
- func ProdFunc(idx int, val float64, ag float64) float64
- func ProdIndex(ix *etable.IndexView, colIndex int) []float64
- func ProdTry(ix *etable.IndexView, colNm string) ([]float64, error)
- func PropIf(ix *etable.IndexView, colNm string, iffun IfFunc) []float64
- func PropIfIndex(ix *etable.IndexView, colIndex int, iffun IfFunc) []float64
- func PropIfTry(ix *etable.IndexView, colNm string, iffun IfFunc) ([]float64, error)
- func Q1(ix *etable.IndexView, colNm string) []float64
- func Q1Index(ix *etable.IndexView, colIndex int) []float64
- func Q1Try(ix *etable.IndexView, colNm string) ([]float64, error)
- func Q3(ix *etable.IndexView, colNm string) []float64
- func Q3Index(ix *etable.IndexView, colIndex int) []float64
- func Q3Try(ix *etable.IndexView, colNm string) ([]float64, error)
- func Quantiles(ix *etable.IndexView, colNm string, qs []float64) []float64
- func QuantilesIndex(ix *etable.IndexView, colIndex int, qs []float64) []float64
- func QuantilesTry(ix *etable.IndexView, colNm string, qs []float64) ([]float64, error)
- func Sem(ix *etable.IndexView, colNm string) []float64
- func SemIndex(ix *etable.IndexView, colIndex int) []float64
- func SemPop(ix *etable.IndexView, colNm string) []float64
- func SemPopIndex(ix *etable.IndexView, colIndex int) []float64
- func SemPopTry(ix *etable.IndexView, colNm string) ([]float64, error)
- func SemTry(ix *etable.IndexView, colNm string) ([]float64, error)
- func Std(ix *etable.IndexView, colNm string) []float64
- func StdIndex(ix *etable.IndexView, colIndex int) []float64
- func StdPop(ix *etable.IndexView, colNm string) []float64
- func StdPopIndex(ix *etable.IndexView, colIndex int) []float64
- func StdPopTry(ix *etable.IndexView, colNm string) ([]float64, error)
- func StdTry(ix *etable.IndexView, colNm string) ([]float64, error)
- func Sum(ix *etable.IndexView, colNm string) []float64
- func SumFunc(idx int, val float64, ag float64) float64
- func SumIndex(ix *etable.IndexView, colIndex int) []float64
- func SumSq(ix *etable.IndexView, colNm string) []float64
- func SumSqFunc(idx int, val float64, ag float64) float64
- func SumSqIndex(ix *etable.IndexView, colIndex int) []float64
- func SumSqTry(ix *etable.IndexView, colNm string) ([]float64, error)
- func SumTry(ix *etable.IndexView, colNm string) ([]float64, error)
- func Var(ix *etable.IndexView, colNm string) []float64
- func VarIndex(ix *etable.IndexView, colIndex int) []float64
- func VarPop(ix *etable.IndexView, colNm string) []float64
- func VarPopIndex(ix *etable.IndexView, colIndex int) []float64
- func VarPopTry(ix *etable.IndexView, colNm string) ([]float64, error)
- func VarTry(ix *etable.IndexView, colNm string) ([]float64, error)
- type Aggs
- type IfFunc
- type IndexViewAggFunc
- type IndexViewAggFuncIndex
- type IndexViewAggFuncTry
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
Functions ¶
func Agg ¶
Agg returns aggregate according to given agg type applied to all non-Null, non-NaN elements in given IndexView 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 AggIndex ¶
AggIndex returns aggregate according to given agg type applied to all non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 CountIf ¶
CountIf returns the count of true return values for given IfFunc on non-Null, non-NaN elements in given IndexView 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 CountIfIndex ¶
CountIfIndex returns the count of true return values for given IfFunc on non-Null, non-NaN elements in given IndexView 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 IndexView 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 CountIndex ¶
CountIndex returns the count of non-Null, non-NaN elements in given IndexView 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 CountTry ¶
CountTry returns the count of non-Null, non-NaN elements in given IndexView 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 IndexView 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 DescIndex ¶
DescIndex returns a table of standard descriptive aggregates of non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 MaxIndex ¶
MaxIndex returns the maximum of non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 MeanIndex ¶
MeanIndex returns the mean of non-Null, non-NaN elements in given IndexView 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 ¶
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 IndexView 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 IndexView 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 MedianIndex ¶
MedianIndex returns the median of non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 MinIndex ¶
MinIndex returns the minimum of non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 PctIfIndex ¶
PctIfIndex returns the percentage (0-100) of true return values for given IfFunc on non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 ProdIndex ¶
ProdIndex returns the product of non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 PropIfIndex ¶
PropIfIndex returns the proportion (0-1) of true return values for given IfFunc on non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 Q1Index ¶
Q1Index returns the first quartile of non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 Q3Index ¶
Q3Index returns the third quartile of non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 QuantilesIndex ¶
QuantilesIndex returns the given quantile(s) of non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 SemIndex ¶
SemIndex returns the sample standard error of the mean of non-Null, non-NaN elements in given IndexView 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 IndexView 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 SemPopIndex ¶
SemPopIndex returns the population standard error of the mean of non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 IndexView 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 StdIndex ¶
StdIndex returns the sample std deviation of non-Null, non-NaN elements in given IndexView 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 IndexView 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 StdPopIndex ¶
StdPopIndex returns the population std deviation of non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 IndexView 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 SumIndex ¶
SumIndex returns the sum of non-Null, non-NaN elements in given IndexView 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 IndexView 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 SumSqIndex ¶
SumSqIndex returns the sum-of-squares of non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 IndexView 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 VarIndex ¶
VarIndex returns the sample variance of non-Null, non-NaN elements in given IndexView 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 IndexView 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 VarPopIndex ¶
VarPopIndex returns the population variance of non-Null, non-NaN elements in given IndexView 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 IndexView 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 IndexView 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 int32 //enums:enum
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 )
const AggsN Aggs = 16
AggsN is the highest valid value for type Aggs, plus one.
func AggsValues ¶
func AggsValues() []Aggs
AggsValues returns all possible values for the type Aggs.
func (Aggs) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface.
func (*Aggs) SetString ¶
SetString sets the Aggs value from its string representation, and returns an error if the string is invalid.
func (*Aggs) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface.
type IndexViewAggFunc ¶
IndexViewAggFunc is an aggregation function operating on IndexView, taking a column name arg
type IndexViewAggFuncIndex ¶
IndexViewAggFuncIndex is an aggregation function operating on IndexView, taking a column index arg