Object

com.github.jonnylaw.model

Streaming

Related Doc: package model

Permalink

object Streaming

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

Type Members

  1. case class MonitorState(i: Int, a: Double, mllVar: Option[Double]) extends Product with Serializable

    Permalink

    A class to monitor the state of ann MCMC chain

    A class to monitor the state of ann MCMC chain

    i

    the number of iterations computed

    a

    the proportion of accepted moves

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 burnin[A](burn: Int): Flow[A, A, NotUsed]

    Permalink

    Remove burnin terms from a stream of parameters

  6. def calculateAverageOfParameters(totalIterations: Int): Flow[Array[Double], Seq[Double], NotUsed]

    Permalink

    Calculate the average of a stream of parameters by grouping them and performing the operations on the grouped parameters

  7. def cleanParameterFlow(file: Path, burn: Int, thin: Int, totalIterations: Int): RunnableGraph[Future[Seq[Double]]]

    Permalink
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def monitorPilot(every: Int, chain: Int): Flow[MetropState, Unit, NotUsed]

    Permalink

    Used to monitor a pilot run of the PMMH algorithm

  16. def monitorStream(every: Int, chain: Int): Flow[MetropState, Unit, NotUsed]

    Permalink

    A helper function to monitor the stream every 'every' iterations with a print statement

    A helper function to monitor the stream every 'every' iterations with a print statement

    every

    number of iterations to wait until a print statement informs of the iteration, and acceptance ratio

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

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  20. def pilotRun(mll: (Parameters) ⇒ LogLikelihood, initParams: Parameters, iters: Int): RunnableGraph[NotUsed]

    Permalink

    Performs a pilot run of the PMMH algorithm, this runs PMMH iterations at a fixed parameter value, returns the acceptance ratio and mll variance, the mll variance should be 1 Change the number of particles in the filter to alter the mll variance

  21. def readParameterStream(file: Path): Source[Array[Double], Future[IOResult]]

    Permalink

    Get parameter stream from file

    Get parameter stream from file

    file

    a filepath to read from

  22. def runMCMC(mh: MetropolisHastings, file: String, iters: Int): RunnableGraph[NotUsed]

    Permalink

    Akka streaming iterations of Metropolis Hastings algorithm with asynchronous file writing

    Akka streaming iterations of Metropolis Hastings algorithm with asynchronous file writing

    mh

    a metropolis hastings class

    file

    a string representing the output filename

    iters

    total amount of iterations to write to file

    returns

    Unit, writes to a file asynchronously as

  23. def runPmmhToFile(fileOut: String, chains: Int, initParams: Parameters, mll: (Parameters) ⇒ LogLikelihood, perturb: (Parameters) ⇒ Rand[Parameters], iterations: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
  25. def thinParameters[A](thin: Int): Flow[A, A, NotUsed]

    Permalink

    Only keep every nth iteration, corresponding to the thin

    Only keep every nth iteration, corresponding to the thin

    thin

    keep every parameters where iteration % thin == 0

    returns

    a thinned stream of Parameter Arrays

  26. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. def writeFileSink[A](file: Path): Sink[A, NotUsed]

    Permalink

    Asynchronously write a file

Inherited from AnyRef

Inherited from Any

Ungrouped