Documentation ¶
Overview ¶
Package estimator implements future value estimation by EWMA algorithm. For a given key. Estimator gives Exponential Weighted Moving Average of its historical values. Estimator can be used in any places where we need to predict the next value associated with a key.
Index ¶
Constants ¶
View Source
const ( // DefaultCapacity is the default maximum number of records that can // be present in Estimator DefaultCapacity = 10 * 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Estimator ¶
type Estimator struct {
// contains filtered or unexported fields
}
Estimator calculates the EWMA of all historical values associated with a key
func NewEstimator ¶
NewEstimator initializes an Estimator object with given capacity and EWMA weightingFactor
func (*Estimator) AddHistory ¶
AddHistory adds an additional historical value associated with a key
Click to show internal directories.
Click to hide internal directories.