Documentation ¶
Index ¶
- func LinearRegression(xData, yData []float64) (slope, intercept, rsquared float64, count int, ...)
- func StatsCount(data []float64) int
- func StatsMax(data []float64) float64
- func StatsMean(data []float64) float64
- func StatsMin(data []float64) float64
- func StatsPopulationKurtosis(data []float64) (kurtosis float64)
- func StatsPopulationSkew(data []float64) (skew float64)
- func StatsPopulationStandardDeviation(data []float64) float64
- func StatsPopulationVariance(data []float64) float64
- func StatsSampleKurtosis(data []float64) float64
- func StatsSampleSkew(data []float64) float64
- func StatsSampleStandardDeviation(data []float64) float64
- func StatsSampleVariance(data []float64) float64
- func StatsSum(data []float64) (sum float64)
- type Regression
- func (r *Regression) Count() int
- func (r *Regression) Intercept() float64
- func (r *Regression) InterceptStandardError() float64
- func (r *Regression) RSquared() float64
- func (r *Regression) Size() int
- func (r *Regression) Slope() float64
- func (r *Regression) SlopeStandardError() float64
- func (r *Regression) Update(x, y float64)
- func (r *Regression) UpdateArray(xData, yData []float64)
- type Stats
- func (d *Stats) Count() int
- func (d *Stats) Max() float64
- func (d *Stats) Mean() float64
- func (d *Stats) Min() float64
- func (d *Stats) PopulationKurtosis() float64
- func (d *Stats) PopulationSkew() float64
- func (d *Stats) PopulationStandardDeviation() float64
- func (d *Stats) PopulationVariance() float64
- func (d *Stats) SampleKurtosis() float64
- func (d *Stats) SampleSkew() float64
- func (d *Stats) SampleStandardDeviation() float64
- func (d *Stats) SampleVariance() float64
- func (d *Stats) Size() int
- func (d *Stats) Sum() float64
- func (d *Stats) Update(x float64)
- func (d *Stats) UpdateArray(data []float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LinearRegression ¶
func StatsCount ¶
Batch functions
These are non-incremental functions that operate only on the data given them. They're prefixed with 'Calc'.
func StatsPopulationKurtosis ¶
The kurtosis functions return _excess_ kurtosis
func StatsPopulationSkew ¶
func StatsPopulationVariance ¶
func StatsSampleKurtosis ¶
func StatsSampleSkew ¶
func StatsSampleVariance ¶
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) PopulationKurtosis ¶
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 (*Stats) PopulationStandardDeviation ¶
func (*Stats) PopulationVariance ¶
func (*Stats) SampleKurtosis ¶
func (*Stats) SampleSkew ¶
func (*Stats) SampleStandardDeviation ¶
func (*Stats) SampleVariance ¶
func (*Stats) UpdateArray ¶
Update the stats with the given array of values.