Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BernoulliProcess ¶
type BernoulliProcess struct {
*IIDProcess
}
A Bernoulli Process generates an infinite sequence of binary-valued random variables from the same Bernoulli distribution.
func NewBernoulliProcess ¶
func NewBernoulliProcess(bias float64) *BernoulliProcess
Generate a new BernoulliProcess
func (*BernoulliProcess) SetBias ¶
func (process *BernoulliProcess) SetBias(bias float64)
type DefProcessDistSampleN ¶
type DefProcessDistSampleN struct {
// contains filtered or unexported fields
}
A default implementation of SampleN() for a StochasticProcess
func (DefProcessDistSampleN) SampleN ¶
func (def DefProcessDistSampleN) SampleN(n int) []variable.RandomVariable
type IIDProcess ¶
type IIDProcess struct { // Distribution parameters Params []variable.RandomVariable // The distribution Dist dist.Dist }
A StochasticProcess which draws iid variables from an underlying distribution
func NewIIDProcess ¶
func NewIIDProcess(params []variable.RandomVariable, dist dist.Dist) *IIDProcess
Create a new IIDProcess based on the given distribution
func (IIDProcess) Factors ¶
func (process IIDProcess) Factors(sequence []variable.RandomVariable) ( factors []factor.Factor)
Return factors relating the process parameters to the given sequence
func (IIDProcess) Sample ¶
func (process IIDProcess) Sample() variable.RandomVariable
Generate the next random variable from the process
func (IIDProcess) SampleN ¶
func (process IIDProcess) SampleN(n int) (rvs []variable.RandomVariable)
Generate the next n random variables from the process
type StochasticProcess ¶
type StochasticProcess interface { // Generate the next random variable from the process Sample() variable.RandomVariable // Generate the next n random variables from the process SampleN(n int) []variable.RandomVariable // Return factors relating the process parameters to the given sequence Factors(sequence []variable.RandomVariable) []factor.Factor }
A stochastic process can generate a sequence of random variables representing the change of state of some system over time. The particular variables and their distributions depend on the particular process.