Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
srzeszut committed Nov 27, 2024
1 parent 572e6c6 commit 2a28cd4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/scholar/naive_bayes/bernoulli.ex
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,7 @@ defmodule Scholar.NaiveBayes.Bernoulli do
log_proba_x =
jll
|> Nx.logsumexp(axes: [1])
|> Nx.new_axis(1)
|> Nx.broadcast(jll)
|> Nx.reshape({Nx.axis_size(jll, 0), 1})

jll - log_proba_x
end
Expand Down

0 comments on commit 2a28cd4

Please sign in to comment.