Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Affie authored Nov 13, 2024
1 parent f77e869 commit eee032a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bagofwords/BagOfWords.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function add_voc_children!(tree, descriptors::Matrix, parent = 1, level = 0; pro
return nothing
end

function countOccurance(voctree, image_descriptors)
function countOccurrence(voctree, image_descriptors)
image_word_count = [Set() for _ in 1:voctree.graph_data[:n_leaves]]
# FIXME make thread save if needed for speed, got undef # Threads.@threads
for (idx, image_desc) in enumerate(image_descriptors)
Expand All @@ -71,7 +71,7 @@ end
# set inverse document frequency idf weights for the vocabulary [SZ 2003]
function setVocabularyWeigths!(voctree, all_desc)
N = length(all_desc) # how many images used to train the vocabulary
occs = countOccurance(voctree, all_desc)
occs = countOccurrence(voctree, all_desc)
_weights = map(occs) do n_i
log(N / n_i) # [SZ 2003, Sec 4]
end
Expand Down

0 comments on commit eee032a

Please sign in to comment.