stats

package
v0.0.0-...-1993eaf Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2013 License: BSD-3-Clause Imports: 1 Imported by: 51 modules, 53 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LinearRegression

func LinearRegression(xData, yData []float64) (slope, intercept, rsquared float64,
	count int, slopeStdErr, interceptStdErr float64)

func StatsCount

func StatsCount(data []float64) int

Batch functions

These are non-incremental functions that operate only on the data given them. They're prefixed with 'Calc'.

func StatsMax

func StatsMax(data []float64) float64

func StatsMean

func StatsMean(data []float64) float64

func StatsMin

func StatsMin(data []float64) float64

func StatsPopulationKurtosis

func StatsPopulationKurtosis(data []float64) (kurtosis float64)

The kurtosis functions return _excess_ kurtosis

func StatsPopulationSkew

func StatsPopulationSkew(data []float64) (skew float64)

func StatsPopulationStandardDeviation

func StatsPopulationStandardDeviation(data []float64) float64

func StatsPopulationVariance

func StatsPopulationVariance(data []float64) float64

func StatsSampleKurtosis

func StatsSampleKurtosis(data []float64) float64

func StatsSampleSkew

func StatsSampleSkew(data []float64) float64

func StatsSampleStandardDeviation

func StatsSampleStandardDeviation(data []float64) float64

func StatsSampleVariance

func StatsSampleVariance(data []float64) float64

func StatsSum

func StatsSum(data []float64) (sum float64)

Types

type Regression

type Regression struct {
	// contains filtered or unexported fields
}

structure to contain the accumulating regression components

func (*Regression) Count

func (r *Regression) Count() int

func (*Regression) Intercept

func (r *Regression) Intercept() float64

func (*Regression) InterceptStandardError

func (r *Regression) InterceptStandardError() float64

func (*Regression) RSquared

func (r *Regression) RSquared() float64

func (*Regression) Size

func (r *Regression) Size() int

func (*Regression) Slope

func (r *Regression) Slope() float64

func (*Regression) SlopeStandardError

func (r *Regression) SlopeStandardError() float64

func (*Regression) Update

func (r *Regression) Update(x, y float64)

Update the stats with a new point.

func (*Regression) UpdateArray

func (r *Regression) UpdateArray(xData, yData []float64)

Update the stats with arrays of x and y values.

type Stats

type Stats struct {
	// contains filtered or unexported fields
}

Data structure to contain accumulating values and moments

func (*Stats) Count

func (d *Stats) Count() int

func (*Stats) Max

func (d *Stats) Max() float64

func (*Stats) Mean

func (d *Stats) Mean() float64

func (*Stats) Min

func (d *Stats) Min() float64

func (*Stats) PopulationKurtosis

func (d *Stats) PopulationKurtosis() float64

The kurtosis functions return _excess_ kurtosis, so that the kurtosis of a normal distribution = 0.0. Then kurtosis < 0.0 indicates platykurtic (flat) while kurtosis > 0.0 indicates leptokurtic (peaked) and near 0 indicates mesokurtic.Update

func (*Stats) PopulationSkew

func (d *Stats) PopulationSkew() float64

func (*Stats) PopulationStandardDeviation

func (d *Stats) PopulationStandardDeviation() float64

func (*Stats) PopulationVariance

func (d *Stats) PopulationVariance() float64

func (*Stats) SampleKurtosis

func (d *Stats) SampleKurtosis() float64

func (*Stats) SampleSkew

func (d *Stats) SampleSkew() float64

func (*Stats) SampleStandardDeviation

func (d *Stats) SampleStandardDeviation() float64

func (*Stats) SampleVariance

func (d *Stats) SampleVariance() float64

func (*Stats) Size

func (d *Stats) Size() int

func (*Stats) Sum

func (d *Stats) Sum() float64

func (*Stats) Update

func (d *Stats) Update(x float64)

Update the stats with the given value.

func (*Stats) UpdateArray

func (d *Stats) UpdateArray(data []float64)

Update the stats with the given array of values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL