From eee032afe0cbc698c8a5e5d8fa27111533471520 Mon Sep 17 00:00:00 2001 From: Johannes Terblanche <6612981+Affie@users.noreply.github.com> Date: Wed, 13 Nov 2024 18:22:36 +0200 Subject: [PATCH] Fix typo --- src/bagofwords/BagOfWords.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bagofwords/BagOfWords.jl b/src/bagofwords/BagOfWords.jl index de0ea303a..9dd1ffc1e 100644 --- a/src/bagofwords/BagOfWords.jl +++ b/src/bagofwords/BagOfWords.jl @@ -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) @@ -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