Documentation
¶
Index ¶
- func Erfc(x float64) float64
- func Ierfc(x float64) float64
- func Mean(num []float64) float64
- func Sign[T int | int8 | int16 | int32 | int64 | float32 | float64](x T) T
- func StandardDeviation(num []float64) float64
- func SumFloat[T float32 | float64](array []T) float64
- func SumInt[T int | int32 | int64](array []T) int64
- func SumUint[T uint | uint32 | uint64](array []T) uint64
- func Variance(mean float64, num []float64) float64
- type Gaussian
- func (g *Gaussian) Add(d *Gaussian) *Gaussian
- func (g *Gaussian) Cdf(x float64) float64
- func (g *Gaussian) Div(d *Gaussian) *Gaussian
- func (g *Gaussian) Mul(d *Gaussian) *Gaussian
- func (g *Gaussian) Pdf(x float64) float64
- func (g *Gaussian) Ppf(x float64) float64
- func (g *Gaussian) Scale(c float64) *Gaussian
- func (g *Gaussian) Sub(d *Gaussian) *Gaussian
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sign ¶
Sign 符号函数(Sign function,简称sgn)是一个逻辑函数,用以判断实数的正负号。为避免和英文读音相似的正弦函数(sine)混淆,它亦称为Signum function。
func StandardDeviation ¶
StandardDeviation 使用方差计算给定数据的标准偏差
Types ¶
type Gaussian ¶
type Gaussian struct {
// contains filtered or unexported fields
}
func NewGaussian ¶
func (*Gaussian) Cdf ¶
Cdf cdf(x): the cumulative distribution function, which describes the probability of a random variable falling in the interval (−∞, x]
func (*Gaussian) Div ¶
Div div(d): returns the quotient distribution of this and the given distribution. If a constant is passed in the distribution is scaled by 1/d.
func (*Gaussian) Mul ¶
Mul mul(d): returns the product distribution of this and the given distribution. If a constant is passed in the distribution is scaled.
func (*Gaussian) Pdf ¶
Pdf pdf(x): the probability density function, which describes the probability of a random variable taking on the value x