Documentation ¶
Index ¶
- func LinearWeighting(index, length int) float64
- func ReverseLinearWeighting(index, length int) float64
- type DataFrame
- func (d *DataFrame) Add(df *DataFrame) *DataFrame
- func (d *DataFrame) AddConst(f float64) *DataFrame
- func (d *DataFrame) Avg() float64
- func (d *DataFrame) Cat(c *DataFrame) *DataFrame
- func (d *DataFrame) Copy() *DataFrame
- func (d *DataFrame) Data() []float64
- func (d *DataFrame) Derivative() *DataFrame
- func (d *DataFrame) Div(df *DataFrame) *DataFrame
- func (d *DataFrame) DivConst(f float64) *DataFrame
- func (d *DataFrame) DoubleExponentialSmooth(sf, tf float64) *DataFrame
- func (d *DataFrame) DoubleSmoothPredictN(n int, sf, tf float64) *DataFrame
- func (d *DataFrame) FFT() []complex128
- func (d *DataFrame) FFTTopFreqs() *DataFrame
- func (d *DataFrame) ForEach(f func(data float64, index int))
- func (d *DataFrame) Grow(amount int) *DataFrame
- func (d *DataFrame) Index(i int) float64
- func (d *DataFrame) Insert(i int, val float64) float64
- func (d *DataFrame) KernalConvolve(kernal *DataFrame) *DataFrame
- func (d *DataFrame) Len() int
- func (d *DataFrame) Max() float64
- func (d *DataFrame) Median() float64
- func (d *DataFrame) Min() float64
- func (d *DataFrame) MovingAverage(windowSize int) *DataFrame
- func (d *DataFrame) MultiConst(f float64) *DataFrame
- func (d *DataFrame) Mutli(df *DataFrame) *DataFrame
- func (d *DataFrame) PlotPoints() plotter.XYs
- func (d *DataFrame) Push(e float64) float64
- func (d *DataFrame) Reduce(newSize int) *DataFrame
- func (d *DataFrame) Reverse() *DataFrame
- func (d *DataFrame) Shift(offset int) *DataFrame
- func (d *DataFrame) Shrink(amount int) *DataFrame
- func (d *DataFrame) SingleExponentialSmooth(sf float64) *DataFrame
- func (d *DataFrame) Slice(b, e int) *DataFrame
- func (d *DataFrame) Sort() *DataFrame
- func (d *DataFrame) StdDev() float64
- func (d *DataFrame) Sub(df *DataFrame) *DataFrame
- func (d *DataFrame) SubConst(f float64) *DataFrame
- func (d *DataFrame) Sum() float64
- func (d *DataFrame) TripleSmooth(smooth, trend, season float64, period int) *DataFrame
- func (d *DataFrame) Weight(wf WeightingFunc) *DataFrame
- func (d *DataFrame) WeightedMovingAverage(windowSize int, wf WeightingFunc) *DataFrame
- type WeightingFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LinearWeighting ¶
Values have a higher weight as time goes on in a liniar fashion
func ReverseLinearWeighting ¶
Types ¶
type DataFrame ¶
type DataFrame struct {
// contains filtered or unexported fields
}
A ring buffer implementation optomized for use with moving window statistic operations
func EmptyDataFrame ¶
Create a new dataframe filled with NaN values
func NewDataFrameFromSlice ¶
Create a new dataframe from an existing slice
func (*DataFrame) Derivative ¶
return a dataframe filled with the derivative values of this dataframe
func (*DataFrame) DoubleExponentialSmooth ¶
DoubleExponentialSmooth given a smoothing factor, apply the hold-winters double exponential smoothing algorhythm
func (*DataFrame) DoubleSmoothPredictN ¶
DoubleSmoothPredictN return a new DataFrame filled with n predictions
func (*DataFrame) FFT ¶
func (d *DataFrame) FFT() []complex128
Return the real and imaginary parts of the fft
func (*DataFrame) FFTTopFreqs ¶
Return the top frequencies found in the dataframe
func (*DataFrame) KernalConvolve ¶
func (*DataFrame) MovingAverage ¶
calculate the moving average of the dataframe
func (*DataFrame) MultiConst ¶
Multiply every value of the dataframe by a single value
func (*DataFrame) PlotPoints ¶
Return a numgo.Plot format for the dataframe
func (*DataFrame) Push ¶
Add a new element to the beginning of the dataframe, this will remove the last value of the dataframe
func (*DataFrame) Reduce ¶
Reduce the dataframe to a given size. TODO : (eliothedeman) optomize this
func (*DataFrame) SingleExponentialSmooth ¶
SingleExponentialSmooth applies basic exponential smoothing to the contents of the DataFrame.
func (*DataFrame) TripleSmooth ¶
TripleSmooth applies holt-winters triple-exponential smoothing to the given dataframe
func (*DataFrame) Weight ¶
func (d *DataFrame) Weight(wf WeightingFunc) *DataFrame
Apply a weighting function to a dataframe
func (*DataFrame) WeightedMovingAverage ¶
func (d *DataFrame) WeightedMovingAverage(windowSize int, wf WeightingFunc) *DataFrame
Returns a new dataframe with a weighted moving average applied to it
type WeightingFunc ¶
Given an index and the length of a dataframe, returns the weight for the given value