object ParticleGibbsAncestor extends App
Particle Gibbs with Ancestor Sampling Requires a Tractable state evolution kernel
- Alphabetic
- By Inheritance
- ParticleGibbsAncestor
- App
- DelayedInit
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
ancestorResampling(mod: Model, time: Double, states: Vector[List[(Double, DenseVector[Double])]], weights: Vector[Double], condState: DenseVector[Double], p: Parameters): (List[List[(Double, DenseVector[Double])]], List[(Double, DenseVector[Double])])
Perform Ancestor Resampling on Particle Paths
Perform Ancestor Resampling on Particle Paths
- mod
a DGLM model
- time
the time of the observation
- states
a vector containing the latent states up to the current time
- weights
a vector of weights calculated at the previous time step
- condState
the previously conditioned upon path
- p
the parameters of the model, including W
- returns
a tuple where the first element is a list describing the paths from 0:time-1, and second element describes the particles at the current time
-
def
args: Array[String]
- Attributes
- protected
- Definition Classes
- App
- Annotations
- @deprecatedOverriding( "args should not be overridden" , "2.11.0" )
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
calcWeight(mod: Model, time: Double, xt: DenseVector[Double], xt1: DenseVector[Double], conditionedState: DenseVector[Double], y: DenseVector[Option[Double]], p: Parameters): Double
The weights are proportional to the conditional likelihood of the observations given the state multiplied by the transition probability of the resampled particles at time t-1 to the conditioned state at time t TODO: This could be wrong, I don't think transition probability is calculated properly
The weights are proportional to the conditional likelihood of the observations given the state multiplied by the transition probability of the resampled particles at time t-1 to the conditioned state at time t TODO: This could be wrong, I don't think transition probability is calculated properly
- mod
the DGLM model
- time
the current time, t
- xt
the value of the state at time t
- xt1
the value of the state at time t-1
- conditionedState
the value of the conditioned state at time t
- y
the observation at time t
- p
the parameters of the model
- returns
the conditional likeihood of the observation given the state and the transition probability to the next conditioned upon state
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
executionStart: Long
- Definition Classes
- App
- Annotations
- @deprecatedOverriding( ... , "2.11.0" )
-
def
filter(n: Int, p: Parameters, mod: Model, obs: List[Data])(state: List[(Double, DenseVector[Double])]): Rand[(Double, List[(Double, DenseVector[Double])])]
Run Particle Gibbs with Ancestor Sampling
Run Particle Gibbs with Ancestor Sampling
- n
the number of particles to have in the sampler
- p
the model parameters
- mod
the DGLM model specification
- obs
a list of measurements
- state
the state which is to be conditioned upon
- returns
a distribution over a tuple containing the log-likelihood and sampled state from the PGAS kernel
-
def
filterAll(n: Int, mod: Model, p: Parameters, obs: List[Data])(state: List[(Double, DenseVector[Double])]): State
Run Particle Gibbs with Ancestor Sampling
Run Particle Gibbs with Ancestor Sampling
- n
the number of particles to have in the sampler
- mod
the DGLM model specification
- p
the model parameters
- obs
a list of measurements
- state
the state which is to be conditioned upon
- returns
the state of the Particle Filter, including all Paths
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
importanceWeight(sampledStates: Vector[DenseVector[Double]], weights: Vector[Double], conditionedState: DenseVector[Double], time: Double, mod: Model, p: Parameters): Vector[Double]
Calculate the importance weights for ancestor resampling the Nth path
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
logSumExp(w: Vector[Double]): Vector[Double]
Recalculate the weights such that the smallest weight is 1
-
def
main(args: Array[String]): Unit
- Definition Classes
- App
- Annotations
- @deprecatedOverriding( "main should not be overridden" , "2.11.0" )
- def missingState(x: DenseVector[Double], y: DenseVector[Option[Double]]): DenseVector[Double]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
sample[A](n: Int, xs: Vector[A], ws: Vector[Double]): Vector[A]
Sample n items with replacement from xs with probability ws
-
def
step(mod: Model, p: Parameters): (State, (Data, DenseVector[Double])) ⇒ State
A single step in the Particle Gibbs with Ancestor Sampling algorithm
A single step in the Particle Gibbs with Ancestor Sampling algorithm
- mod
the model specification
- p
the parameters of the model
- returns
the state containing the particles, weights and running log-likelihood
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
transitionProbability(sampledState: DenseVector[Double], time: Double, mod: Model, p: Parameters)(conditionedState: DenseVector[Double]): Double
Calculate the transition probability from a given particle at time t-1 to the conditioned upon particle at time t
Calculate the transition probability from a given particle at time t-1 to the conditioned upon particle at time t
- sampledState
a particle value at time t-1
- time
the time t
- mod
the DGLM model specification
- p
the parameters of the model
- conditionedState
the value of the conditioned state at time t
- returns
the value of the log of the transition probability as a Double
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
Deprecated Value Members
-
def
delayedInit(body: ⇒ Unit): Unit
- Definition Classes
- App → DelayedInit
- Annotations
- @deprecated
- Deprecated
(Since version 2.11.0) the delayedInit mechanism will disappear