Skip to content

Commit

Permalink
line switch preserves n
Browse files Browse the repository at this point in the history
  • Loading branch information
dswatson committed Nov 28, 2023
1 parent f25f26e commit 74b4661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ leaf_posterior <- function(params, evidence) {
# Continuous features
if (any(evidence$family != 'multinom')) {
evi <- evidence[family != 'multinom']
psi <- merge(evi, params$cnt, by = 'variable')
evi[, n := .N, by = variable]
psi <- merge(evi, params$cnt, by = 'variable')
if (any(evi$relation == '==')) {
psi[relation == '==', lik :=
truncnorm::dtruncnorm(value, a = min, b = max, mean = mu, sd = sigma)]
Expand Down

0 comments on commit 74b4661

Please sign in to comment.