smfsb
package smfsb
Object containing basic types used throughout the library.
- Alphabetic
- By Inheritance
- smfsb
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait CsvRow[T] extends AnyRef
Type class for vectors that can be rendered to a CSV string (and a Breeze DenseVector[Double]), extended by
State
- implicit class CsvRowSyntax[T] extends AnyRef
Syntax for
CsvRow
- trait DataSet[D] extends AnyRef
Data set type class, for ABC methods
- type DoubleState = DenseVector[Double]
Alias for a Breeze
DenseVector[Double]
- type HazardVec = DenseVector[Double]
Type for a SPN hazard vector
- type IntState = DenseVector[Int]
Alias for a Breeze
DenseVector[Int]
- type LogLik = Double
Type representing log-likelihoods - just an alias for
Double
.Type representing log-likelihoods - just an alias for
Double
. All likelihoods in this library are on a log scale. There should be no raw likelihoods passed into or out of any user-facing function. - case class MarkedSpn[S](species: List[String], m: S, pre: DenseMatrix[Int], post: DenseMatrix[Int], h: (S, Time) => HazardVec)(implicit evidence$2: State[S]) extends Spn[S] with Product with Serializable
Case class for SPNs that include an initial marking
- case class PMatrix[T](x: Int, y: Int, r: Int, c: Int, data: ParVector[T]) extends Product with Serializable
Comonadic pointed 2d image/matrix type (parallel implementation), used by the spatial simulation functions.
- case class PVector[T](cur: Int, vec: ParVector[T]) extends Product with Serializable
Comonadic pointed vector type (parallel implementation), used by the spatial simulation functions.
- sealed trait Spn[S] extends AnyRef
Main trait for stochastic Petri nets (SPNs)
- trait State[S] extends CsvRow[S]
State type class, with implementations for Breeze
DenseVector
Ints
andDoubles
- trait Thinnable[F[_]] extends AnyRef
A type class for things which can be "thinned", with an implementation for
Stream
.A type class for things which can be "thinned", with an implementation for
Stream
. Useful for MCMC algorithms. - implicit class ThinnableSyntax[T, F[T]] extends AnyRef
Provision of the
.thin
syntax forThinnable
things - type Time = Double
Type representing time, but just an alias for
Double
- type Ts[S] = List[(Time, S)]
The main time series class, for representing output from simulation functions, and for observed time course data
- case class UnmarkedSpn[S](species: List[String], pre: DenseMatrix[Int], post: DenseMatrix[Int], h: (S, Time) => HazardVec)(implicit evidence$1: State[S]) extends Spn[S] with Product with Serializable
Case class for SPNs without an initial marking
Value Members
- implicit val dvdState: State[DoubleState]
Evidence that
DoubleState
belongs to theState
type class - implicit val dviState: State[IntState]
Evidence that
IntState
belongs to theState
type class - implicit val streamThinnable: Thinnable[LazyList]
A
Thinnable
instance forStream
- implicit val tsdsDs: DataSet[Ts[DoubleState]]
Evidence that
Ts[DoubleState]
is aDataSet
- implicit val tsisDs: DataSet[Ts[IntState]]
Evidence that
Ts[IntState]
is aDataSet
- object Abc
Functions for parameter inference using ABC (and ABC-SMC) methods
- object Mcmc
Functions for constucting generic Metropolis-Hastings MCMC algorithms, and associated utilities.
Functions for constucting generic Metropolis-Hastings MCMC algorithms, and associated utilities. Can be used in conjunction with an unbiased estimate of marginal model likelihood for constructing pseudo-marginal MCMC algorithms, such as PMMH pMCMC.
- object Mll
Functions associated with particle filtering of Markov process models against time series data and the computation of marginal model likelihoods.
- case object PMatrix extends Product with Serializable
- object Sim
Functions for simulating data associated with a Markov process given an appropriate transition kernel.
- object Spatial
All functions and utilities relating to spatial simulation
- object SpnModels
Some example SPN models, each of which can be instantiated with either discrete or continous states.
- object Step
Functions which accept a
Spn
and return a function for simulating from the transition kernel of that model