Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockDiag ¶
BlockDiag creates a block diagonal matrix with the provided matrices running along its diagonal.
func DenseValues ¶
DenseValues extracts the row-major data from the provided dense matrix.
Types ¶
type Deterministic ¶
Deterministic is the type against which we apply deterministic model updates.
func NewDeterministic ¶
func NewDeterministic(period float64) (d *Deterministic)
NewDeterministic creates and returns a Deterministic with a proper state prior.
func (*Deterministic) Forecast ¶
func (d *Deterministic) Forecast(period float64, n int) (f []*uv.Normal)
Forecast returns a forecasted slice of normal RVs for this deterministic component.
func (*Deterministic) State ¶
func (d *Deterministic) State() (k *kalman.State)
State returns the kalman filter State.
type History ¶
type History []float64
History contains the last two observations for this stream, it is required to do covariance estimation in real time.
type Model ¶
type Model struct { Deterministic *Deterministic Stochastic *Stochastic RCE *RCE }
Model stores dynamic state about a stream.
type RCE ¶
type RCE struct { Theta *uv.InverseGamma Zeta *uv.InverseGamma History History }
RCE is a recursive covariance estimator for a local level kalman filter.
type Stochastic ¶
Stochastic is the type against which we apply stochastic model updates.
func NewStochastic ¶
func NewStochastic() (s *Stochastic)
NewStochastic returns a stochastic with a proper state prior.
func (*Stochastic) Forecast ¶
func (s *Stochastic) Forecast(noise, walk float64, n int) (f []*uv.Normal)
Forecast returns a forecasted slice of normal RVs for this stochastic component.
func (*Stochastic) State ¶
func (s *Stochastic) State() (k *kalman.State)
State returns the kalman filter State.
func (*Stochastic) System ¶
func (s *Stochastic) System(noise, walk float64) (k *kalman.System)
System generates process and observation matrices for this linear system.
func (*Stochastic) Update ¶
func (s *Stochastic) Update(noise, walk, val float64) (err error)
Update performs a filter step against the stochastic state.