Skip to content

Commit

Permalink
Document fit! (#88)
Browse files Browse the repository at this point in the history
* Document fit!

* Patch version

* Collapse docstrings

* fit_in_sequence
  • Loading branch information
gdalle authored Feb 22, 2024
1 parent ba666fb commit f4b750d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "HiddenMarkovModels"
uuid = "84ca31d5-effc-45e0-bfda-5a68cd981f47"
authors = ["Guillaume Dalle"]
version = "0.4.0"
version = "0.4.1"

[deps]
ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197"
Expand Down
4 changes: 4 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
```@meta
CollapsedDocStrings = true
```

# API reference

```@docs
Expand Down
5 changes: 4 additions & 1 deletion src/types/abstract_hmm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ function obs_logdensities!(
end

"""
$(SIGNATURES)
StatsAPI.fit!(
hmm, fb_storage::ForwardBackwardStorage,
obs_seq, [control_seq]; seq_ends,
)
Update `hmm` in-place based on information generated during forward-backward.
Expand Down
2 changes: 1 addition & 1 deletion src/utils/fit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Default behavior:
Override for Distributions.jl (in the package extension)
dists[i] = fit(eltype(dists), x, w)
dists[i] = fit(eltype(dists), turn_into_vector(x), w)
"""
function fit_in_sequence!(dists::AbstractVector, i::Integer, x, w)
fit!(dists[i], x, w)
Expand Down

0 comments on commit f4b750d

Please sign in to comment.