Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ProbabilityMonad.Test/Models/HiddenMarkovModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ from emit in emissionDist(initial)
samples = from prev in samples
from next in transitionDist(prev.Last().Item1)
from emit in emissionDist(next)
select Append(prev, Tuple(next, emit)).ToList();
select prev.Append(Tuple(next, emit)).ToList();
numSamples -= 1;
}
return samples;
Expand Down Expand Up @@ -94,7 +94,7 @@ public static Dist<List<int>> Hmm(List<double> observed)
Condition(xs => emission(xs.Last(), y),
(from rest in d
from x in transitionMatrix(rest.Last())
select Append(rest, x).ToList()));
select rest.Append(x).ToList()));

return observed.Aggregate(startDist, expand);
}
Expand Down
Loading