-
Notifications
You must be signed in to change notification settings - Fork 71
/
stats.go
73 lines (50 loc) · 1.3 KB
/
stats.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Copyright (c) 2024, Cogent Core. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package stats
//go:generate core generate
// Stats is a list of different standard aggregation functions, which can be used
// to choose an aggregation function
type Stats int32 //enums:enum
const (
// count of number of elements
Count Stats = iota
// sum of elements
Sum
// product of elements
Prod
// minimum value
Min
// max maximum value
Max
// minimum absolute value
MinAbs
// maximum absolute value
MaxAbs
// mean mean value
Mean
// sample variance (squared diffs from mean, divided by n-1)
Var
// sample standard deviation (sqrt of Var)
Std
// sample standard error of the mean (Std divided by sqrt(n))
Sem
// L1 Norm: sum of absolute values
L1Norm
// sum of squared values
SumSq
// L2 Norm: square-root of sum-of-squares
L2Norm
// population variance (squared diffs from mean, divided by n)
VarPop
// population standard deviation (sqrt of VarPop)
StdPop
// population standard error of the mean (StdPop divided by sqrt(n))
SemPop
// middle value in sorted ordering
Median
// Q1 first quartile = 25%ile value = .25 quantile value
Q1
// Q3 third quartile = 75%ile value = .75 quantile value
Q3
)