package model
- Alphabetic
- By Inheritance
- model
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
AuxFilter(n: Int) extends FilterTs[PfState, DlmParameters, Dglm] with Product with Serializable
Calculate an one-dimensional unknown observation variance
-
case class
ConjugateFilter(prior: InverseGamma, advState: (InverseGammaState, Double) ⇒ InverseGammaState) extends FilterTs[InverseGammaState, DlmParameters, Dlm] with Product with Serializable
Calculate an one-dimensional unknown observation variance
-
case class
Data(time: Double, observation: DenseVector[Option[Double]]) extends Product with Serializable
A single observation of a model
-
case class
Dglm(observation: (DenseVector[Double], DenseMatrix[Double]) ⇒ Rand[DenseVector[Double]], f: (Double) ⇒ DenseMatrix[Double], g: (Double) ⇒ DenseMatrix[Double], link: (DenseVector[Double]) ⇒ Double, conditionalLikelihood: (DenseMatrix[Double]) ⇒ (DenseVector[Double], DenseVector[Double]) ⇒ Double) extends Product with Serializable
A DGLM used for modelling non-linear non-Gaussian univariate time series
-
case class
Dlm(f: (Double) ⇒ DenseMatrix[Double], g: (Double) ⇒ DenseMatrix[Double]) extends Product with Serializable
A state space model with a linear Gaussian latent-state
A state space model with a linear Gaussian latent-state
- f
the observation matrix which can be a function of time
- g
the system matrix
-
case class
DlmFsvParameters(dlm: DlmParameters, fsv: FsvParameters) extends Product with Serializable
Parameters of a DLM with a Factor structure for the observation matrix
Parameters of a DLM with a Factor structure for the observation matrix
- dlm
the parameters of the (multivariate) DLM
- fsv
the parameters of the
-
case class
DlmParameters(v: DenseMatrix[Double], w: DenseMatrix[Double], m0: DenseVector[Double], c0: DenseMatrix[Double]) extends Product with Serializable
Parameters of a DLM
-
trait
FilterTs[S, P, M] extends AnyRef
Abstract trait for a filter which allows the filter to be performed on any collection which implementes Traverse
-
case class
FsvParameters(v: DenseMatrix[Double], beta: DenseMatrix[Double], factorParams: Vector[SvParameters]) extends Product with Serializable
Factor Stochastic Volatility Parameters for a model with k factors and p time series k << p
Factor Stochastic Volatility Parameters for a model with k factors and p time series k << p
- v
the variance of the measurement error
- beta
the factor loading matrix, p x k
- factorParams
a vector of length k containing the ISV parameters for the factors
- case class InverseGamma(shape: Double, scale: Double)(implicit rand: RandBasis = Rand) extends ContinuousDistr[Double] with Moments[Double, Double] with Product with Serializable
-
case class
InverseGammaState(kfState: KfState, variance: Vector[InverseGamma]) extends Product with Serializable
State for the conjugate filter
State for the conjugate filter
- kfState
the latent-state
- variance
the distribution of the observation precision
- case class InverseWishart(nu: Double, psi: DenseMatrix[Double])(implicit rand: RandBasis = Rand) extends ContinuousDistr[DenseMatrix[Double]] with Moments[DenseMatrix[Double], DenseMatrix[Double]] with Product with Serializable
- case class KalmanFilter(advState: (KfState, Double) ⇒ KfState) extends FilterTs[KfState, DlmParameters, Dlm] with Product with Serializable
-
case class
KfState(time: Double, mt: DenseVector[Double], ct: DenseMatrix[Double], at: DenseVector[Double], rt: DenseMatrix[Double], ft: Option[DenseVector[Double]], qt: Option[DenseMatrix[Double]]) extends Product with Serializable
State for the Kalman Filter
State for the Kalman Filter
- time
the current timestep
- mt
the posterior mean of the latent state
- ct
the posterior covariance of the latent state
- at
the prior mean of the latent state
- rt
the prior covariance of the latent state
- qt
the one step predicted observation covariance, not present at the first timestep
-
case class
LiuAndWestFilter(n: Int, prior: Rand[DlmParameters], a: Double, n0: Int) extends FilterTs[PfStateParams, DlmParameters, Dglm] with Product with Serializable
Extended Particle filter which approximates the parameters as a particle cloud
-
case class
MatrixNormal(mu: DenseMatrix[Double], u: DenseMatrix[Double], v: DenseMatrix[Double])(implicit rand: RandBasis = Rand) extends ContinuousDistr[DenseMatrix[Double]] with Product with Serializable
A Normal distribution over matrices
A Normal distribution over matrices
- mu
the location of the distribution
- u
the variance of the rows
- v
the variance of the columns
- case class MultivariateGaussianSvd(mu: DenseVector[Double], cov: DenseMatrix[Double])(implicit rand: RandBasis = Rand) extends ContinuousDistr[DenseVector[Double]] with Product with Serializable
- case class MultivariateStudentsT(dof: Double, location: DenseVector[Double], shape: DenseMatrix[Double])(implicit rand: RandBasis = Rand) extends ContinuousDistr[DenseVector[Double]] with Moments[DenseVector[Double], DenseMatrix[Double]] with Product with Serializable
-
case class
ParticleFilter(n: Int, n0: Int, resample: (Vector[DenseVector[Double]], Vector[Double]) ⇒ Vector[DenseVector[Double]]) extends FilterTs[PfState, DlmParameters, Dglm] with Product with Serializable
A bootstrap particle filter which can be used for inference of Dynamic Generalised Linear Models (DGLMs), where the observation distribution is not Gaussian.
A bootstrap particle filter which can be used for inference of Dynamic Generalised Linear Models (DGLMs), where the observation distribution is not Gaussian.
- n
the number of particles used in the filter
- n0
if ESS < n0 then resample
-
case class
ParticleGibbs(n: Int) extends Product with Serializable
Particle Gibbs Sampler for A Dynamic Generalised Linear Dglm
-
case class
PfState(time: Double, state: Vector[DenseVector[Double]], weights: Vector[Double], ll: Double) extends Product with Serializable
State of the Bootstrap Particle Filter
-
case class
PfStateParams(time: Double, state: Vector[DenseVector[Double]], weights: Vector[Double], params: Vector[DlmParameters]) extends Product with Serializable
State for the particle filter with parameters TODO: Gamma mixture distribution
State for the particle filter with parameters TODO: Gamma mixture distribution
- time
the time of the observation
- state
a particle cloud representing the latent-state
- weights
the conditional log-likelihood of the latent-state
- params
a particle cloud representing the values of the parameters
- case class PgState(conditionedState: Map[Double, DenseVector[Double]], states: Vector[Vector[(Double, DenseVector[Double])]], weights: Vector[Double], ll: Double) extends Product with Serializable
-
case class
RaoBlackwellFilter(n: Int, prior: Rand[DlmParameters], a: Double, n0: Int) extends FilterTs[RbState, DlmParameters, Dlm] with Product with Serializable
Extended Particle filter which approximates the parameters as a particle cloud
- case class RbState(time: Double, params: Vector[DlmParameters], mt: Vector[DenseVector[Double]], ct: Vector[DenseMatrix[Double]], weights: Vector[Double]) extends Product with Serializable
- case class SamplingState(time: Double, sample: DenseVector[Double], mean: DenseVector[Double], cov: DenseMatrix[Double], at1: DenseVector[Double], rt1: DenseMatrix[Double]) extends Product with Serializable
- case class ScaledStudentsT(dof: Double, location: Double, scale: Double)(implicit rand: RandBasis = Rand) extends ContinuousDistr[Double] with Moments[Double, Double] with Product with Serializable
-
trait
Simulate[M, P, S] extends AnyRef
Abstract trait to simulate data
- case class StochVolState(params: SvParameters, alphas: Vector[SampleState]) extends Product with Serializable
-
case class
StorvikState(time: Double, state: Vector[DenseVector[Double]], params: Vector[DlmParameters], statsV: Vector[Vector[InverseGamma]], statsW: Vector[Vector[InverseGamma]], ess: Int) extends Product with Serializable
State of the Storvik filter
State of the Storvik filter
- time
the time of the observation associated with this latent state
- state
the particle cloud representing the posterior state
- case class SvParameters(phi: Double, mu: Double, sigmaEta: Double) extends Product with Serializable
-
case class
SvdFilter(advState: (SvdState, Double) ⇒ SvdState) extends FilterTs[SvdState, DlmParameters, Dlm] with Product with Serializable
Perform the Kalman Filter by updating the value of the Singular Value Decomp.
Perform the Kalman Filter by updating the value of the Singular Value Decomp. of the state covariance matrix, C = UDU^T
https://arxiv.org/pdf/1611.03686.pdf
- case class SvdState(time: Double, mt: DenseVector[Double], dc: DenseVector[Double], uc: DenseMatrix[Double], at: DenseVector[Double], dr: DenseVector[Double], ur: DenseMatrix[Double], ft: DenseVector[Double]) extends Product with Serializable
- case class Wishart(n: Double, scale: DenseMatrix[Double])(implicit rand: RandBasis = Rand) extends ContinuousDistr[DenseMatrix[Double]] with Moments[DenseMatrix[Double], DenseMatrix[Double]] with Product with Serializable
Value Members
-
implicit
def
dlm2dglm(dlmModel: Dlm): Dglm
A Gaussian DLM can be implicitly converted to a DGLM Then particle filtering methods can be used on Gaussian Models
- implicit val randMonad: Monad[Rand]
- object AuxFilter extends Serializable
- object ConjugateFilter extends Serializable
- object Dglm extends Serializable
-
object
Dlm extends Serializable
A DLM with a p-vector of observations y_t = F_t x_t + v_t, v_t ~ N(0, V) x_t = F_t x_{t-1} + w_t, w_t ~ N(0, W)
-
object
DlmFsv
Model a heteroskedastic time series DLM by modelling the log-covariance of the observation variance as latent-factors
- object DlmFsvParameters extends Serializable
-
object
DlmFsvSystem
Fit a DLM with the system variance modelled using an FSV model and latent log volatility modelled using continuous time Ornstein-Uhlenbeck process
- object DlmParameters extends Serializable
-
object
FactorSv
Model a large covariance matrix using a factor structure
-
object
FilterAr
Filtering for the stochastic volatility model
- object FilterOu
- object FilterTs
- object FsvParameters extends Serializable
- object GibbsSampling
-
object
GibbsWishart
This class learns a correlated system matrix using the InverseWishart prior on the system noise matrix
- object KalmanFilter extends Serializable
- object LiuAndWestFilter extends Serializable
- object Metropolis
- object MetropolisHastings
- object ParticleFilter extends Serializable
- object ParticleGibbs extends Serializable
- object Smoothing
-
object
StochasticVolatility
Simulate and fit a Stochastic volatility model using a mixture model approximation for the non-linear dynamics for either a AR(1) latent-state or OU latent state
Simulate and fit a Stochastic volatility model using a mixture model approximation for the non-linear dynamics for either a AR(1) latent-state or OU latent state
Y_t = sigma * exp(a_t / 2), sigma ~ N(0, 1) a_t = phi * a_t + eta, eta ~ N(0, sigma_eta)
-
object
StochasticVolatilityKnots
Use a Gaussian approximation to the state space to sample the stochastic volatility model with discrete regular observations and an AR(1) latent state
- object StorvikFilter
- object Streaming
-
object
StudentT
Fit a state space model with a latent Gaussian state and a Student's t observation distribution using the fact that the student's t-distribution is an Inverse Gamma mixture of normals
- object SvParameters extends Serializable
- object SvdFilter extends Serializable
-
object
SvdSampler
Backward Sampler utilising the SVD for stability TODO: Check this