Skip to content

Commit 914e641

Browse files
committed
next steps
1 parent a9f531a commit 914e641

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/classifier.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ function naieve_bayes(seqs::Vector,refs::Vector,k, n_bootstrap,lp,genera)
7070
assignments = Vector{Int64}(undef,n)
7171
confs = Vector{Float64}(undef,n)
7272
if lp == false
73+
# This gives correct results on test cases
74+
# but could likely be sped up.
7375
log_probs = [zeros(Float32,4^k) for _ in 1:g]
7476
priors, a =count_mers(refs)
7577
word_priors!(priors,N)
@@ -94,6 +96,7 @@ function naieve_bayes(seqs::Vector,refs::Vector,k, n_bootstrap,lp,genera)
9496
end
9597

9698
function naieve_bayes(seqs::Vector,refs::Vector,taxa ::Array,k, n_bootstrap,lp=false)
99+
# This and sbove need a bit of a tidy up, following switch to mean over genera
97100
a,c,l,g = naieve_bayes(seqs,refs,k, n_bootstrap,lp,taxa[:,end])
98101
gens = g[a]
99102
inds = [findfirst(x -> x== gen,taxa[:,end]) for gen in gens]

0 commit comments

Comments
 (0)