sequence_updates(sequence,
last_model,
empty_arrays,
array_ids,
update_initial=True)
| source code
|
Evaluates the forward/backward probability matrices for a single
sequence under the model that came from the previous iteration and
returns matrices that contain the updates to be made to the distributions
during this iteration.
This is wrapped up in a function so it can be run in parallel for each
sequence. Once all sequences have been evaluated, the results are
combined and model updated.
- Parameters:
update_initial (bool) - usually you want to update all distributions, including the
initial state distribution. If update_initial=False, the initial
state distribution updates won't be made for this sequence. We
want this when the sequence is actually a non-initial fragment of
a longer sequence
|