Advanced Data Structures: Count-Min Sketches

Поделиться
HTML-код
  • Опубликовано: 28 сен 2024

Комментарии • 17

  • @Ahmad_Alhasanat
    @Ahmad_Alhasanat 3 года назад +2

    When A, (65 mod= 0), why you left the (h1,0 ) =0, shouldn't you increment it by 1?

    • @niemasd
      @niemasd  3 года назад +2

      No, I only performed an "increment" operation on B. For A, I performed a "find" operation, which should not modify the counts in any way

  • @kingchakho6074
    @kingchakho6074 3 года назад

    Hi, i have a question. So, suppose now we only use one hash function for this problem and the hash function is chosen from the 2-uniform family. And suppose m =5 as in the above example, then if all the elements in the stream has difference of 5, e.g. 3,8,13,18,23,28,33,...etc, then the estimate count of any single element will be much much larger than the actual count, right?

    • @niemasd
      @niemasd  3 года назад +1

      Precisely! In that case, the Counr-Min Sketch will do extremely poorly :-)

    • @kingchakho6074
      @kingchakho6074 3 года назад

      @@niemasd thank you! that's just my intuition, but can you explain why the hash function won't matter the result(i.e. Count Min Sketch will perform poorly no matter which hash function is chosen from 2-uniform family)?

  • @ArunKumar-jk5pq
    @ArunKumar-jk5pq 2 года назад

    Is there a logic for deciding value of m?

    • @niemasd
      @niemasd  2 года назад

      Absolutely! We discuss it in the next video in the playlist: ruclips.net/video/0-XxKI64T7g/видео.html

    • @ArunKumar-jk5pq
      @ArunKumar-jk5pq 2 года назад

      @@niemasd This is awesome. Thanks for doing this 🙏🏽

  • @terigopula
    @terigopula 3 года назад

    what is m here?

    • @niemasd
      @niemasd  3 года назад +1

      m is the number of columns in our Count-Min Sketch

    • @terigopula
      @terigopula 3 года назад +2

      @@niemasd haha yeah I can see that.. how did you decide 'm' is what I am asking. Like k is let's say the value of top K that we want to find and so the number of hash functions/rows is k. In the video you said, we have some m number of columns. What is the value of m and how to decide?

  • @zuowang5185
    @zuowang5185 4 месяца назад

    and you didn't finish the video? just left with a not optimal solution

    • @niemasd
      @niemasd  4 месяца назад

      It continues in the next video in the playlist... ruclips.net/p/PLM_KIlU0WoXmkV4QB1Dg8PtJaHTdWHwRS&si=ZZkCLwbNvCIhDwdF

  • @TheCorship
    @TheCorship 4 года назад +1

    Good, clear and on point explanation with a very descriptive example!

    • @damilola_adegunwa
      @damilola_adegunwa Год назад

      Really??!! even after understanding Count-min sketch from watching another video and coming back here - He seem not to have focus on the main points, like what happens when you call say 'B' multiple times, why we are picking the minimum as the most, I think too much emphasis was placed on the way he did his hash (anybody can choose their hash function - even the ascii thing is his custom implementation detail)... dont get me wrong, been watching his other videos an they are nice - i just think this could be better done.

  • @kliklaminaat
    @kliklaminaat 4 года назад +1

    Thank you!