Skip to content

Commit

Permalink
Update src/experimental/ProbabilisticGraphicalModels/bayesnet.jl
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
naseweisssss and github-actions[bot] authored Nov 4, 2024
1 parent 62c07ed commit 344b4f1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/experimental/ProbabilisticGraphicalModels/bayesnet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ function ancestral_sampling(bn::BayesianNetwork{V}) where {V}
samples[vertex_name] = bn.values[vertex_name]
continue
end

if bn.is_stochastic[vertex_id]
dist_idx = findfirst(id -> id == vertex_id, bn.stochastic_ids)
samples[vertex_name] = rand(bn.distributions[dist_idx])
Expand Down

0 comments on commit 344b4f1

Please sign in to comment.