@@ -37,16 +37,16 @@ abstract type ObservationProcess end
37
37
"""
38
38
distribution(dyn::LatentDynamics, extra)
39
39
40
- Return the initialisation distribution for the latent dynamics.
40
+ Return the initialisation distribution for the latent dynamics.
41
41
42
- The method should return the distribution of the initial state of the latent dynamics.
43
- The returned value should be a `Distributions.Distribution` object that implements
44
- sampling and log-density calculations.
42
+ The method should return the distribution of the initial state of the latent dynamics.
43
+ The returned value should be a `Distributions.Distribution` object that implements
44
+ sampling and log-density calculations.
45
45
46
- See also [`LatentDynamics`](@ref).
46
+ See also [`LatentDynamics`](@ref).
47
47
48
- # Returns
49
- - `Distributions.Distribution`: The distribution of the initial state.
48
+ # Returns
49
+ - `Distributions.Distribution`: The distribution of the initial state.
50
50
"""
51
51
function distribution (dyn:: LatentDynamics , extra)
52
52
throw (MethodError (distribution, (dyn, extra)))
55
55
"""
56
56
distribution(dyn::LatentDynamics, step::Integer, state, extra)
57
57
58
- Return the transition distribution for the latent dynamics.
58
+ Return the transition distribution for the latent dynamics.
59
59
60
- The method should return the distribution of the state for the next time step given the
61
- current state `state` at time step `step`. The returned value should be a
62
- `Distributions.Distribution` object that implements sampling and log-density
63
- calculations.
60
+ The method should return the distribution of the state for the next time step given the
61
+ current state `state` at time step `step`. The returned value should be a
62
+ `Distributions.Distribution` object that implements sampling and log-density
63
+ calculations.
64
64
65
- See also [`LatentDynamics`](@ref).
65
+ See also [`LatentDynamics`](@ref).
66
66
67
- # Returns
68
- - `Distributions.Distribution`: The distribution of the new state.
67
+ # Returns
68
+ - `Distributions.Distribution`: The distribution of the new state.
69
69
"""
70
70
function distribution (dyn:: LatentDynamics , step:: Integer , state, extra)
71
71
throw (MethodError (distribution, (dyn, step, state, extra)))
74
74
"""
75
75
distribution(obs::ObservationProcess, step::Integer, state, extra)
76
76
77
- Return the observation distribution for the observation process.
77
+ Return the observation distribution for the observation process.
78
78
79
- The method should return the distribution of an observation given the current state
80
- `state` at time step `step`. The returned value should be a `Distributions.Distribution`
81
- object that implements sampling and log-density calculations.
79
+ The method should return the distribution of an observation given the current state
80
+ `state` at time step `step`. The returned value should be a `Distributions.Distribution`
81
+ object that implements sampling and log-density calculations.
82
82
83
- See also [`ObservationProcess`](@ref).
83
+ See also [`ObservationProcess`](@ref).
84
84
85
- # Returns
86
- - `Distributions.Distribution`: The distribution of the observation.
85
+ # Returns
86
+ - `Distributions.Distribution`: The distribution of the observation.
87
87
"""
88
88
function distribution (obs:: ObservationProcess , step:: Integer , state, extra)
89
89
throw (MethodError (distribution, (obs, step, state, extra)))
@@ -112,15 +112,15 @@ end
112
112
"""
113
113
simulate([rng::AbstractRNG], dyn::LatentDynamics, step::Integer, state, extra)
114
114
115
- Simulate a transition of the latent dynamics.
115
+ Simulate a transition of the latent dynamics.
116
116
117
- The method should return a random state for the next time step given the state `state`
118
- at the current time step, `step`.
117
+ The method should return a random state for the next time step given the state `state`
118
+ at the current time step, `step`.
119
119
120
- The default behaviour is generate a random sample from distribution returned by the
121
- corresponding `distribution()` method.
120
+ The default behaviour is generate a random sample from distribution returned by the
121
+ corresponding `distribution()` method.
122
122
123
- See also [`LatentDynamics`](@ref).
123
+ See also [`LatentDynamics`](@ref).
124
124
"""
125
125
function simulate (rng:: AbstractRNG , dyn:: LatentDynamics , step:: Integer , state, extra)
126
126
return rand (rng, distribution (dyn, step, state, extra))
@@ -132,15 +132,15 @@ end
132
132
"""
133
133
simulate([rng::AbstractRNG], process::ObservationProcess, step::Integer, state, extra)
134
134
135
- Simulate an observation given the current state.
135
+ Simulate an observation given the current state.
136
136
137
- The method should return a random observation given the current state `state` at time
138
- step `step`.
137
+ The method should return a random observation given the current state `state` at time
138
+ step `step`.
139
139
140
- The default behaviour is generate a random sample from distribution returned by the
141
- corresponding `distribution()` method.
140
+ The default behaviour is generate a random sample from distribution returned by the
141
+ corresponding `distribution()` method.
142
142
143
- See also [`ObservationProcess`](@ref).
143
+ See also [`ObservationProcess`](@ref).
144
144
"""
145
145
function simulate (rng:: AbstractRNG , obs:: ObservationProcess , step:: Integer , state, extra)
146
146
return rand (rng, distribution (obs, step, state, extra))
@@ -152,15 +152,15 @@ end
152
152
"""
153
153
logdensity(dyn::LatentDynamics, new_state, extra)
154
154
155
- Compute the log-density of an initial state for the latent dynamics.
155
+ Compute the log-density of an initial state for the latent dynamics.
156
156
157
- The method should return the log-density of the initial state `new_state` for the
158
- initial time step of the latent dynamics.
157
+ The method should return the log-density of the initial state `new_state` for the
158
+ initial time step of the latent dynamics.
159
159
160
- The default behaviour is to compute the log-density of the distribution return by the
161
- corresponding `distribution()` method.
160
+ The default behaviour is to compute the log-density of the distribution return by the
161
+ corresponding `distribution()` method.
162
162
163
- See also [`LatentDynamics`](@ref).
163
+ See also [`LatentDynamics`](@ref).
164
164
"""
165
165
function logdensity (dyn:: LatentDynamics , new_state, extra)
166
166
return logpdf (distribution (dyn, extra), new_state)
@@ -169,15 +169,15 @@ end
169
169
"""
170
170
logdensity(dyn::LatentDynamics, step::Integer, state, new_state, extra)
171
171
172
- Compute the log-density of a transition of the latent dynamics.
172
+ Compute the log-density of a transition of the latent dynamics.
173
173
174
- The method should return the log-density of the new state `new_state` given the current
175
- state `state` at time step `step`.
174
+ The method should return the log-density of the new state `new_state` given the current
175
+ state `state` at time step `step`.
176
176
177
- The default behaviour is to compute the log-density of the distribution return by the
178
- corresponding `distribution()` method.
177
+ The default behaviour is to compute the log-density of the distribution return by the
178
+ corresponding `distribution()` method.
179
179
180
- See also [`LatentDynamics`](@ref).
180
+ See also [`LatentDynamics`](@ref).
181
181
"""
182
182
function logdensity (dyn:: LatentDynamics , step:: Integer , state, new_state, extra)
183
183
return logpdf (distribution (dyn, step, state, extra), new_state)
@@ -186,15 +186,15 @@ end
186
186
"""
187
187
logdensity(obs::ObservationProcess, step::Integer, state, observation, extra)
188
188
189
- Compute the log-density of an observation given the current state.
189
+ Compute the log-density of an observation given the current state.
190
190
191
- The method should return the log-density of the observation `observation` given the
192
- current state `state` at time step `step`.
191
+ The method should return the log-density of the observation `observation` given the
192
+ current state `state` at time step `step`.
193
193
194
- The default behaviour is to compute the log-density of the distribution return by the
195
- corresponding `distribution()` method.
194
+ The default behaviour is to compute the log-density of the distribution return by the
195
+ corresponding `distribution()` method.
196
196
197
- See also [`ObservationProcess`](@ref).
197
+ See also [`ObservationProcess`](@ref).
198
198
"""
199
199
function logdensity (obs:: ObservationProcess , step:: Integer , state, observation, extra)
200
200
return logpdf (distribution (obs, step, state, extra), observation)
0 commit comments