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(x: Seq[Double]): Seq[Double]

    Permalink
  7. def diff(x: Iterable[Time]): Iterable[TimeIncrement]

    Permalink

    Return a vector of lag 1 time differences

    Return a vector of lag 1 time differences

    x

    a list of times

    returns

    a list of differenced times

  8. def effectiveSampleSize(weights: Seq[LogLikelihood]): Int

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def filter(t0: Time, n: Int): Reader[Model, Pipe[Task, Data, PfState]]

    Permalink

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

    Construct a particle filter to calculate the state of an fs2 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 => Pipe[Task, Data, PfState] When given a Model, this can be used to filter an fs2 stream of data eg: val mod: Model val pf = filter(0.0, 100) val data: Stream[Task, Data] = // data as an fs2 stream data. through(pf(mod))

  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def getAllCredibleIntervals(s: Seq[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

  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def getCredibleInterval(s: Seq[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)

  16. 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

  17. def getIntervals(mod: Model): (PfState) ⇒ PfOut

    Permalink

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

  18. def getOrderStatistic(samples: Seq[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

  19. def hashCode(): Int

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

    Permalink

    Produces a histogram output of a vector of Data

  21. def indentity[A](samples: Seq[A], weights: Seq[LogLikelihood]): Seq[A]

    Permalink
  22. def invecdf[A](ecdf: Seq[(A, LogLikelihood)], p: Double): A

    Permalink

    Return the value x such that, F(p) = x, where F is the empirical cumulative distribution function over the particles

  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. def likelihood(resamplingScheme: Resample[State], data: Seq[Data], n: Int): Reader[Model, LogLikelihood]

    Permalink

    Construct a particle filter to determine the pseudo-marginal likelihood of a POMP model This function returns the Reader Monad (Reader[Model, LogLikelihood]) which means the function can be composed with a model: val mod: Reader[Parameters, Model] = // any model here val mll: Reader[Parameters, Likelihood] = likelihood(_, _, _) compose mod To get the function back from inside the Reader monad, simply use mll.run

    Construct a particle filter to determine the pseudo-marginal likelihood of a POMP model This function returns the Reader Monad (Reader[Model, LogLikelihood]) which means the function can be composed with a model: val mod: Reader[Parameters, Model] = // any model here val mll: Reader[Parameters, Likelihood] = likelihood(_, _, _) compose mod To get the function back from inside the Reader monad, simply use mll.run

    resamplingScheme

    the resampling scheme to use in the particle filter

    data

    a sequence of data to determine the likelihood of

    n

    the number of particles to use in the particle filter

    returns

    a function from model to logLikelihood

  25. def meanState(x: Seq[State]): State

    Permalink

    Calculate the mean of a state

  26. def multinomialResampling[A](particles: Seq[A], weights: Seq[LogLikelihood]): Seq[A]

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef
  28. def normalise(prob: Seq[Double]): Seq[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

  29. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  31. def oneStepForecast(x0: List[State], t0: Time, t: Time, mod: Model): Rand[(ForecastOut, Seq[State])]

    Permalink
  32. def residualResampling[A](particles: Seq[A], weights: Seq[LogLikelihood]): Seq[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

  33. def sample(n: Int, prob: DenseVector[Double]): Seq[Int]

    Permalink

    Sample integers from 1 to n with replacement according to their associated probabilities

    Sample integers from 1 to n with replacement according to their associated probabilities

    n

    a number matching the number of probabilities

    prob

    a vector of probabilities corresponding to the probability of sampling that integer

    returns

    a vector containing the samples

  34. def stratifiedResampling[A](particles: Seq[A], weights: Seq[LogLikelihood]): Seq[A]

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef
  36. def systematicResampling[A](particles: Seq[A], weights: Seq[LogLikelihood]): Seq[A]

    Permalink

    Systematic Resampling Sample n ORDERED numbers (one for each particle), reusing the same U(0,1) variable

  37. def toString(): String

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

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

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

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

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped