Skip to content

Commit

Permalink
remove varname
Browse files Browse the repository at this point in the history
  • Loading branch information
naseweisssss committed Feb 6, 2025
1 parent 84105c9 commit bb2ab5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ function translate_BUGSGraph_to_BayesianNetwork(g::JuliaBUGS.BUGSGraph)
node_types = Vector{Symbol}(undef, n)

for (i, varname) in enumerate(varnames)
symbol_name = varname
nodeinfo = g[varname]
names[i] = symbol_name
names_to_ids[symbol_name] = i
names[i] = varname
names_to_ids[varname] = i
is_stochastic[i] = nodeinfo.is_stochastic
is_observed[i] = nodeinfo.is_observed

Expand All @@ -77,7 +76,7 @@ function translate_BUGSGraph_to_BayesianNetwork(g::JuliaBUGS.BUGSGraph)
push!(stochastic_ids, i)
node_types[i] = :stochastic
else
distributions[i] = Normal() # Placeholder for deterministic nodes. TODO: Is there a better way?
distributions[i] = Normal() #TODO: Change it to nothing/undef after the definition changes
deterministic_fns[i] = nodeinfo.node_function
push!(deterministic_ids, i)
node_types[i] = :deterministic
Expand Down
1 change: 1 addition & 0 deletions test/experimental/ProbabilisticGraphicalModels/bayesnet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -368,3 +368,4 @@ using JuliaBUGS: @bugs, compile, NodeInfo, VarName
Function
end
end

0 comments on commit bb2ab5d

Please sign in to comment.