Object/Trait

com.github.jonnylaw.model

ParticleFilter

Related Docs: trait ParticleFilter | package model

Permalink

object ParticleFilter

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ParticleFilter
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def cumSum[F[_], A](l: F[A])(implicit f: Collection[F], N: Numeric[A]): F[A]

    Permalink

    Generic cumulative sum

  7. def ecdf[F[_]](w: F[Double])(implicit f: Collection[F]): F[Double]

    Permalink

    Calculate the empirical cumulative distribution function for a collection of weights

  8. def effectiveSampleSize[F[_]](weights: F[Double])(implicit f: Collection[F]): Int

    Permalink

    Calculate the effective sample size of a particle cloud, from the un-normalised weights by first normalising the weights, then calculating the reciprocal of the sum of the squared weights

    Calculate the effective sample size of a particle cloud, from the un-normalised weights by first normalising the weights, then calculating the reciprocal of the sum of the squared weights

    weights

    the unnormalised weights

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def expNormalise[F[_]](prob: F[LogLikelihood])(implicit f: Collection[F]): F[Double]

    Permalink

    Given a vector of log-likelihoods, normalise them and exp them without overflow

  12. def filter[F[_]](resample: Resample[F, State], t0: Time, n: Int)(implicit arg0: Collection[F]): Reader[Model, Flow[Data, PfState[F], NotUsed]]

    Permalink

    Construct a particle filter to calculate the state of an Akka Stream of Data

    Construct a particle filter to calculate the state of an Akka Stream of Data

    t0

    the starting time of the observations

    n

    the number of particles to use in the filter

    returns

    a Reader monad representing the function Model => Flow[Task, Data, PfState] When given a Model, this can be used to filter an fs2 stream of data eg: val mod: Model val resample: Resample[F, State] val pf = filter(resample, 0.0, 100) val data: Source[NotUsed, Data] = // data as an fs2 stream data. through(pf(mod))

  13. def filterFromPosterior[F[_]](resample: Resample[F, (Parameters, State)], init: F[(Parameters, State)], t: Time)(unparamModel: (Parameters) ⇒ Model)(implicit arg0: Collection[F]): Flow[Data, ParamFilterState[F], NotUsed]

    Permalink

    Construct a particle filter which starts at time t with a draw from the joint posterior p(x, theta | y) at time t

    Construct a particle filter which starts at time t with a draw from the joint posterior p(x, theta | y) at time t

    resample

    the resampling scheme

    t

    the time to start the filter

  14. def filterLlState[F[_]](data: Vector[Data], resample: Resample[F, State], n: Int)(implicit arg0: Collection[F]): Reader[Model, (LogLikelihood, Vector[State])]

    Permalink

    Return the likelihood and a sample from the state path as a tuple

    Return the likelihood and a sample from the state path as a tuple

    data

    a vector containing observations

    resample

    a method of resampling in the particle filter

    n

    the number of particles to use in the particle filter

  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def getCredibleInterval(s: Vector[State], n: Int, interval: Double): IndexedSeq[CredibleInterval]

    Permalink

    Get the credible intervals of the nth state vector

    Get the credible intervals of the nth state vector

    s

    a State

    n

    a reference to a node of state tree, counting from 0 on the left

    interval

    the probability interval size

    returns

    a tuple of doubles, (lower, upper)

  18. def getCredibleIntervals(x0: Rand[State], interval: Double): IndexedSeq[CredibleInterval]

    Permalink

    Given a distribution over State, calculate credible intervals by repeatedly drawing from the distribution and ordering the samples

  19. def getForecast[F[_]](s: PfState[F], mod: Model, t: Time)(implicit f: Collection[F]): F[ObservationWithState]

    Permalink

    Given an initial set of particles, representing an approximation of the posterior distribution of the filtering state at time t0, simulate the particles forward calculating the predicted observation distribution and intervals

  20. def getIntervals[F[_]](mod: Model)(implicit f: Collection[F]): (PfState[F]) ⇒ PfOut

    Permalink

    Transforms PfState into PfOut, including gamma, gamma intervals and state intervals

  21. def getMeanForecast[F[_]](s: PfState[F], mod: Model, t: Time)(implicit f: Collection[F]): ForecastOut

    Permalink

    Given a state of the particle filter, advance the state and calculate the mean of the state, gamma and forecast observation

    Given a state of the particle filter, advance the state and calculate the mean of the state, gamma and forecast observation

    s

    the state of the particle filter

    mod

    the model used to predict the observations

    t

    the time of the prediction

    returns

    ForecastOut, a summary containing the mean of the state, gamma and observation

  22. def getOrderStatistic(samples: Vector[Double], interval: Double): CredibleInterval

    Permalink

    Gets credible intervals for a vector of doubles

    Gets credible intervals for a vector of doubles

    samples

    a vector of samples from a distribution

    interval

    the upper interval of the required credible interval

    returns

    order statistics representing the credible interval of the samples vector

  23. def getallCredibleIntervals(s: Vector[State], interval: Double): IndexedSeq[CredibleInterval]

    Permalink

    Use getCredibleInterval to get all credible intervals of a state

    Use getCredibleInterval to get all credible intervals of a state

    s

    a vector of states

    interval

    the interval for the probability interval between [0,1]

    returns

    a sequence of tuples, (lower, upper) corresponding to each state reading

  24. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  25. def hist(x: Vector[Int]): Unit

    Permalink

    Produces a histogram output of a vector of Data

  26. def indentity[A](samples: Vector[A], weights: Vector[Double]): Vector[A]

    Permalink
  27. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  28. def likelihood[F[_]](data: Vector[Data], resample: Resample[F, State], n: Int)(implicit f: Collection[F]): Reader[Model, LogLikelihood]

    Permalink

    Construct a particle filter to determine the pseudo-marginal likelihood of a POMP model

    Construct a particle filter to determine the pseudo-marginal likelihood of a POMP model

    data

    a sequence of data to determine the likelihood of

    n

    the number of particles to use in the particle filter

    returns

    a value of logLikelihood

  29. def mean[F[_], A](s: F[A])(implicit f: Collection[F], N: Fractional[A]): A

    Permalink
  30. def meanState(x: Vector[State]): State

    Permalink

    Calculate the mean of a state

  31. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  32. def normalise[F[_]](prob: F[Double])(implicit f: Collection[F]): F[Double]

    Permalink

    Given a vector of doubles, returns a normalised vector with probabilities summing to one

    Given a vector of doubles, returns a normalised vector with probabilities summing to one

    prob

    a vector of unnormalised probabilities

    returns

    a vector of normalised probabilities

  33. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. def parMultinomialResampling[A](particles: ParVector[A], weights: ParVector[LogLikelihood]): ParVector[A]

    Permalink
  36. def residualResampling[A](particles: Vector[A], weights: Vector[Double]): Vector[A]

    Permalink

    Residual Resampling Select particles in proportion to their weights, ie particle xi appears ki = n * wi times Resample m (= n - total allocated particles) particles according to w = n * wi - ki using other resampling technique

  37. def sampleMany[A](n: Int, s: Vector[A]): IndexedSeq[A]

    Permalink

    Sample unifomly without replacement

  38. def sampleOne[F[_], A](s: F[A])(implicit f: Collection[F]): A

    Permalink

    Sample one thing, uniformly, from a collection

  39. def serialMultinomialResampling[A](particles: Vector[A], weights: Vector[LogLikelihood]): Vector[A]

    Permalink

    Multinomial Resampling, sample from a categorical distribution with probabilities equal to the particle weights

  40. def stratifiedResampling[F[_], A](s: F[A], w: F[Double])(implicit f: Collection[F]): F[A]

    Permalink

    Stratified resampling Sample n ORDERED uniform random numbers (one for each particle) using a linear transformation of a U(0,1) RV

  41. def sum[F[_], A](l: F[A])(implicit F: Collection[F], N: Numeric[A]): A

    Permalink
  42. def summariseForecast(mod: Model, interval: Double): (Vector[ObservationWithState]) ⇒ ForecastOut

    Permalink
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  44. def systematicResampling[F[_], A](s: F[A], w: F[Double])(implicit f: Collection[F]): F[A]

    Permalink

    Generic systematic Resampling

  45. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  46. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. def weightedMean(x: Vector[State], w: Vector[Double]): State

    Permalink

    Calculate the weighted mean of a particle cloud

Inherited from AnyRef

Inherited from Any

Ungrouped