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 filter[F[_]](resample: Resample[F, State], t0: Time, n: Int)(implicit arg0: Collection[F]): Reader[Model, Pipe[Task, Data, PfState[F]]]

    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 filterWithIntervals[F[_]](data: List[Data], resample: Resample[F, State], t0: Time, n: Int)(implicit arg0: Collection[F]): Reader[Model, List[PfOut]]

    Permalink
  13. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. def getCredibleInterval(s: List[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[F[_]](mod: Model)(implicit f: Collection[F]): (PfState[F]) ⇒ PfOut

    Permalink

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

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

  19. def getOrderStatistic(samples: List[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

  20. def getallCredibleIntervals(s: List[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

  21. def hashCode(): Int

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

    Permalink

    Produces a histogram output of a vector of Data

  23. def indentity[A](samples: List[A], weights: List[Double]): List[A]

    Permalink
  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def likelihood(data: List[Data], n: Int, resample: Resample[List, State]): 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

    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

  26. def meanState(x: List[State]): State

    Permalink

    Calculate the mean of a state

  27. def multinomialResampling[F[_], A](particles: F[A], weights: F[LogLikelihood])(implicit f: Collection[F]): F[A]

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef
  29. 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

  30. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  32. def parLikelihood(data: List[Data], n: Int)(implicit parallelism: Int = 4): Reader[Model, LogLikelihood]

    Permalink
  33. def residualResampling[A](particles: List[A], weights: List[Double]): List[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

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

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

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

    Permalink

    Generic systematic Resampling

    Generic systematic Resampling

    Write SBT doctest scalacheck tests

  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: List[State], w: List[Double]): State

    Permalink

    Calculate the weighted mean of a particle cloud

Inherited from AnyRef

Inherited from Any

Ungrouped