Datar-Gionis-Indyk-Motwani (DGIM) Algorithm | Counting 1's in a stream | At A Glance!

Поділитися
Вставка
  • Опубліковано 8 кві 2023
  • In this video, we delve into the fascinating world of near-neighbor search, and explore the Datar-Gionis-Indyk-Motwani (DGIM) algorithm, a state-of-the-art technique for efficient data processing. Whether you're a data analyst, data engineer, or data scientist, this video will provide you with the tools you need to tackle complex data problems with ease.
    We'll start with an overview of the challenges of near-neighbor search, and why it's such an important problem in today's data-driven world. Then, we'll dive into the DGIM algorithm, exploring its key concepts and how it works in practice.
    But we won't stop there. We'll also provide a step-by-step solution to a real-world example, demonstrating how the DGIM algorithm can be used to solve near-neighbor search problems in a practical setting. You'll learn how to implement the algorithm using Python code, and how to interpret the results.
    By the end of this video, you'll be equipped with a deep understanding of the DGIM algorithm, and how it can be used to solve near-neighbor search problems in a wide range of applications, from image recognition to recommendation systems.
    So join us as we explore the cutting-edge world of near-neighbor search, and discover how the DGIM algorithm can help you unlock the full potential of your data processing capabilities!
    __________________________________________
    Don't forget to check the playlist of Sorting here: • Sorting Algorithms | A...
    Also don't forget to subscribe the entire playlist of Searching here: • Searching Algorithms |...
    Full Arrays Playlist: • Arrays | At A Glance!
    White Box Testing Numerical Playlist: • White Box Testing | At...
    Big Data Analytics Playlist: • Big Data Analytics | A...
    Deep Learning Playlist: • Deep Learning | At A G...
    Python Small Projects Playlist: • Python Small Projects!...
    Subscribe to At A Glance!
    Follow me on Instagram: / at_a_glance_official
    __________________________________________

КОМЕНТАРІ • 116

  • @dummy.zm0734
    @dummy.zm0734 Рік тому +8

    Very helpful 💖 thank you

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      Thanks a lot for appreciating! I am glad that you liked it😊 Please Share it with your friends and support ❤️ Best wishes for your exams 💕

  • @devswaika
    @devswaika Рік тому +3

    Too good brother, thank you for making such videos!

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +2

      Thankyou so much for appreciation ❤️ Please stay connected to my channel🙏🏻

  • @zafimamyjaryavitsara5312
    @zafimamyjaryavitsara5312 9 місяців тому +1

    Thanks a lot ! You helped me a lot ! The explanation is very clear

    • @ataglanceofficial
      @ataglanceofficial  9 місяців тому +1

      I am glad that it helped you! Please share it with your friends😇💕 Best wishes for your exams🔥

  • @kethsiyajothy7599
    @kethsiyajothy7599 8 місяців тому +4

    It was such a very detailed and clear explanation. Really appreciate your work :)

    • @ataglanceofficial
      @ataglanceofficial  8 місяців тому +1

      Thankyou so much for your great appreciation😇 Please Share with your friends also 🙏🏻 Best wishes for your exams🔥

  • @archanasengotuvel7585
    @archanasengotuvel7585 Рік тому +1

    Crystal clear thank you🙏

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      You are most welcome🤗 Please Like and Subscribe to my channel and please share it with your friends 🤗❤️

  • @Deepakkumar-tx8eq
    @Deepakkumar-tx8eq Рік тому +4

    Thank you brother for such an easy explanation .... i understood all the steaming issues in one go from your videos... keep up the good work🔥

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      Extremely happy to hear that🥳 Thankyou so much for your appreciation🔥 Please Share it with your friends ❤️🙏🏻

  • @akshadatamboli671
    @akshadatamboli671 4 місяці тому +1

    Great... thank you so much 👏

  • @prahaladmugi9275
    @prahaladmugi9275 4 місяці тому

    Very Helpful ,Thank U for such good Explaination .

    • @ataglanceofficial
      @ataglanceofficial  4 місяці тому

      Thanks a ton for appreciating ♥️Please Share it with your friends ☺️

  • @nammawhistle3624
    @nammawhistle3624 Рік тому +2

    Thank you and this video is more helpful for me 🙏

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      I am very happy that my video helped you😊 Please do a favour on me by sharing the video with your friends🙏🏻💗 Thankyou again for appreciation 😁

  • @AkashKinage-ir9ez
    @AkashKinage-ir9ez 6 місяців тому +1

    AWESOME EXPLANATION!!

    • @ataglanceofficial
      @ataglanceofficial  6 місяців тому

      Thankyou so much 🤗 Please Share it with your friends ♥️ Best wishes for your exams 💞

  • @Chippy_chips
    @Chippy_chips Місяць тому +1

    thanks a lot ...... it was really helpful and clearly explained !!

    • @ataglanceofficial
      @ataglanceofficial  Місяць тому +1

      Thanks for appreciation ☺️ Please Share it with your friends too ♥️🙏

  • @sameermeshram3610
    @sameermeshram3610 6 місяців тому +1

    Thank you for this awesome and simple explanation really helped me in understanding the concept😃

    • @ataglanceofficial
      @ataglanceofficial  6 місяців тому

      Thank you so much for your appreciation.... Please Share it with your friends too ♥️
      Best wishes for your exams 💞

  • @TheHaribols
    @TheHaribols 6 місяців тому +1

    Write the script to sort the values contained in the following vector in ascending
    order and descending order: (23, 45, 10, 34, 89, 20, 67, 99). Demonstrate the
    output

  • @kishorer1243
    @kishorer1243 Рік тому +3

    Thank you

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +2

      You are welcome! Please Like, Share and Subscribe ❤️

  • @abhigyanganguly1988
    @abhigyanganguly1988 Рік тому +3

    This is the best. Really helped me for my exam

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      I am glad to know that it helped you? Thankyou so much for watching ❤️ Please Like, Share and Subscribe 😀

  • @Deepika_Dupakuntla
    @Deepika_Dupakuntla Місяць тому +1

    wonderful explanation ,
    thank you so much Sir....

    • @ataglanceofficial
      @ataglanceofficial  Місяць тому +1

      I am glad that you liked it😍 Please Share it with your friends too 😀

  • @siddhivetal9666
    @siddhivetal9666 Рік тому +3

    Thanks alot..Really helped👍

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      Glad to know that you liked it! Please Like, Subscribe and Share it with your friends❤️😊

  • @yonderbobcat211
    @yonderbobcat211 Рік тому +4

    Great explanation

  • @543-kishorebugatha7
    @543-kishorebugatha7 Рік тому +3

    very good explanation and visual representation is awesome

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      Thankyou so much for your appreciation!💕 Please Please Share it with your friends! Support❤️

  • @saadvadanagara3276
    @saadvadanagara3276 Рік тому +2

    very smooth explaination

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +2

      Thanks a lot for appreciating! Please Subscribe and Share it with your friends❤️😊

  • @rajvishah1877
    @rajvishah1877 Рік тому +1

    Just amazing

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      Thanks a lot for your appreciating words!❤️ Please Share it with your friends✨ Best wishes for your exams 💕

  • @mumbaikachallenge5526
    @mumbaikachallenge5526 6 місяців тому

    Thanks man this is amazing❤️😊

    • @ataglanceofficial
      @ataglanceofficial  6 місяців тому

      You are welcome 😁 Thanks for appreciating💞✨

  • @sumitsonar1690
    @sumitsonar1690 10 місяців тому +1

    easy to understand explaination brother thanks🤗

    • @ataglanceofficial
      @ataglanceofficial  10 місяців тому +1

      That's so nice of you to watch and appreciate me! Thankyou so much😍 Please do share this with your friends😇💕

  • @mohamedjassim7004
    @mohamedjassim7004 8 місяців тому +1

    What a explanation bro. Marvelous.🥺.

    • @ataglanceofficial
      @ataglanceofficial  8 місяців тому +1

      What a beautiful comment bro🤩🙏🏻 Thankyou so much🔥 Best wishes for your exams💕

  • @rutikabhuimbar4734
    @rutikabhuimbar4734 8 місяців тому +1

    Helpful!!!

    • @ataglanceofficial
      @ataglanceofficial  8 місяців тому +1

      Thanks a lot 😊 Please Share it with your friends ❤️🤠

  • @varnitgamex
    @varnitgamex 8 місяців тому +1

    what a beautiful video

  • @user-fr3ic8cd5y
    @user-fr3ic8cd5y Рік тому +3

    Clear explaination

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +2

      Thanks a lot for appreciating! Please Subscribe and share it with your friends and support me🙏🏻❤️

  • @ANUSHAB-fo6zh
    @ANUSHAB-fo6zh 8 місяців тому

    bro, you are doing a really great job hats off bro🤗

    • @ataglanceofficial
      @ataglanceofficial  8 місяців тому

      I am very glad that my videos helped you☺️ Thanks for appreciating! Please Share it with your friends 😉🙏🏻

  • @lavanyakalathi510
    @lavanyakalathi510 7 місяців тому

    Excellent explanation

    • @ataglanceofficial
      @ataglanceofficial  7 місяців тому

      Thanks a lot 😊🙏 Please Share it with your friends 😄

  • @shubhamyadav-ig8bi
    @shubhamyadav-ig8bi Рік тому +1

    great explanation

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +2

      Thanks a ton for appreciation 😄 Please Share my videos with your friends and support ❤️🙏🏻 Best wishes for your exams🤝

  • @atharvayerunkar8976
    @atharvayerunkar8976 6 місяців тому

    Great ❤

  • @luckykid8398
    @luckykid8398 6 місяців тому

    Great work ✨✨

    • @ataglanceofficial
      @ataglanceofficial  6 місяців тому

      Thankyou so much ❤️🥰 Please Share it with your friends 😉

  • @gantachamundeswari9831
    @gantachamundeswari9831 4 місяці тому +1

    very clear

    • @ataglanceofficial
      @ataglanceofficial  4 місяці тому +1

      Thanks a ton 🙏🤗 Please Share it with your friends ♥️

  • @bhavishahadiyal7836
    @bhavishahadiyal7836 Рік тому +1

    Very great explanation and so easy✨

  • @user-ps7iq3ic8k
    @user-ps7iq3ic8k 6 місяців тому

    Simple explanation ❤

    • @ataglanceofficial
      @ataglanceofficial  6 місяців тому

      Thank you so much for your appreciation 🥰 Please Share it with your friends ♥️🙏

  • @YashPatil-hv9pp
    @YashPatil-hv9pp 6 місяців тому

    Yash, You are amazing man!

    • @ataglanceofficial
      @ataglanceofficial  6 місяців тому

      Thankyou so much Yash for such words🤗
      Please Share it with your friends ♥️
      Best wishes for your exams 💞

  • @user-sb4gx2nz1v
    @user-sb4gx2nz1v 8 місяців тому +5

    what if the questio would have been [ No's of 1 in recent 20 bits?]

    • @ataglanceofficial
      @ataglanceofficial  8 місяців тому +17

      For the case of first 20 bits, the answer would be 13! As you know for the first 18 bits there are 9 bits of one. Now if you increase the count to first 20 bits. The length of entire next bucket (4) will be counted. That is why 9+4=13 is the answer... As DGIM algorithm is meant for providing only approximated count of 1's in a stream data as any streaming data is much huge and continuous. Therefore it's difficult to get correct results! Hope it helps❤️ Best wishes for your exams💕

  • @superrv0023
    @superrv0023 2 місяці тому +1

    total number of elements present in the stream were 21 then why was n=20

  • @anshumansharma7225
    @anshumansharma7225 3 місяці тому +1

    ❤🚀

  • @vaibhavmourya65
    @vaibhavmourya65 6 місяців тому

    Great

    • @ataglanceofficial
      @ataglanceofficial  6 місяців тому

      Thanks a ton 😊 Please Share it with your friends too ♥️ Best wishes for your exams 💞

  • @kritikaanand4931
    @kritikaanand4931 Рік тому +1

    We'll explained ❤

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      Thankyou so much for your appreciating words😊 Please do a favour by sharing it with your friends❤️

  • @mrunalinisonawane775
    @mrunalinisonawane775 6 місяців тому

    why did u add bits as 011 can i add any combination of bit i want?? also how do we know how many bits we can add?

  • @yashgarg950
    @yashgarg950 5 місяців тому

    sir,till when we need to add 1 to the end to form buckets...what is the terminating condition of adding 1 at the end.
    Because if there is no terminating condition then the answer of the query i.e. how many 1's are there in the last 16 bits.......will be different for different students.

  • @rahulthilak3730
    @rahulthilak3730 7 місяців тому +1

    I have a question. Do we have to always show those 3 scenarios : if new entering bit is 0,1,1 and then we have to count the number of recent/first bits whatever is asked? or can I count it directly in the question's given stream?

    • @ataglanceofficial
      @ataglanceofficial  7 місяців тому +1

      Its not mandatory to show all these three scenarios and then count the bits.. it's totally up to you, but if time permits in the exam then please show all these scenarios. Hope it helps! Thanks for watching ☺️

  • @saiganeshaddagiri2627
    @saiganeshaddagiri2627 Місяць тому

    As you said well no two buckets should be of same size then why you consider same sizes bits repeatedly regardless of rule conventions?

    • @ataglanceofficial
      @ataglanceofficial  Місяць тому

      No more than two buckets should be of the same sizes.. please carefully listen🙏

  • @srisivanandhini5256
    @srisivanandhini5256 4 місяці тому

    How we are mapping the bucket

  • @shaundabre5552
    @shaundabre5552 8 місяців тому +1

    nice

  • @sarthaktamhankar
    @sarthaktamhankar Рік тому +1

    Great explanation!
    One question, are counting 1's in a stream and window both same or different?

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      Thanks a lot for appreciating!❤️
      See for counting 1's in a stream we use DGIM algorithm because it gives the approximated answer by forming buckets. For counting 1's in a specific window also you can use DGIM algorithm. But since the window contains finite number of elements you can use any simple algorithms also for counting.
      In short, both the problems are going to count the 1's but the DGIM algorithm has a sublinear time complexity, which makes it efficient for counting 1's in large windows / stream.
      Hope it helps!❤️ Best wishes for your exams.... 💕

    • @sarthaktamhankar
      @sarthaktamhankar Рік тому +1

      @@ataglanceofficial Got it, thanks!

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      Cool 🙌🏻

    • @ayushyelne7064
      @ayushyelne7064 Рік тому +2

      Sarthak udya help kar paper madhe🙏

    • @sarthaktamhankar
      @sarthaktamhankar Рік тому

      @@ayushyelne7064 😆

  • @ajaysoni9538
    @ajaysoni9538 6 місяців тому

    If new number is entering then we have to take it into the right side ? And in book the formula of 1’s is half of the size of oldest bucket+size of all newer bucket.

    • @ataglanceofficial
      @ataglanceofficial  6 місяців тому

      See standard way of adding elements is from right side and also make sure if you are adding elements from right then you have to start creating buckets from right side only
      In the video I have told how to count 1's you can use that

    • @ajaysoni9538
      @ajaysoni9538 6 місяців тому

      @@ataglanceofficial ya I saw your complete video, great explanation

    • @ataglanceofficial
      @ataglanceofficial  6 місяців тому +1

      Thankyou so much 🤗 Please Share it with your friends too ♥️
      Best wishes for your exams 💞

  • @rahulthilak3730
    @rahulthilak3730 9 місяців тому

    What if the questions is to count the first 18 bits , should we count from the left?

    • @ataglanceofficial
      @ataglanceofficial  9 місяців тому

      Heyy that's a great question, look once buckets are formed it's location/timestamp is also stored.. so if you want to count number of 1's in a particular location/timestamp you can easily traverse to that timestamps and access the number of buckets that comes under it and easily count the total number of 1's in it..
      Ans: Here, for your example, for getting 1's from first 18 bits, you can start counting from the left and easily count it because here the data is extremely small and it's easy to access. But when it comes to big data, the counter will traverse to the target timestamp and then will count the first 18 bits.... Hope it helps! Thanks for watching! Please do share with your friends ❤️😁

  • @21-kalwarmohit19
    @21-kalwarmohit19 6 місяців тому

    what if they asked for recent 19 bits instead of 18 ?

    • @ataglanceofficial
      @ataglanceofficial  6 місяців тому

      Look in the first 18 bits there are total 9 1's,
      And now if you ask for first 19 bits you can see that the 19th bit lies in a separate bucket with length 4
      So the total number of 1's in the first 19 bits will be 9 (for first 18 bits) + 4 (bucket length that contains the 19th bit) = 13.
      So in summary the answer will be 13. Now this is acceptable because dgim is meant for counting "approximate" numbers of 1's.
      Hope it helps, please share it with your friends too ♥️☺️

  • @mihirpaghdal7974
    @mihirpaghdal7974 Рік тому +1

    What if we need to count the number of 1's in recent 19 bits instead of 18?
    My guess: 13
    Is it correct?

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +2

      For this case yes you are correct! As DGIM algorithm is meant for providing only approximated count of 1's in a stream data as any streaming data is much huge and continuous. Therefore it's difficult to get correct results! Hope it helps❤️ Best wishes for your exams💕

    • @mihirpaghdal7974
      @mihirpaghdal7974 Рік тому +1

      @@ataglanceofficial Thank you so much!!!

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      You are most welcome! Please Subscribe❤️🙏🏻

  • @janhvibhilare2092
    @janhvibhilare2092 Рік тому +2

    Very helpful 💖 thank you

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +2

      I am very happy to see that you liked it! ❤️ Please Like, Subscribe and Share it with your friends 🙏🏻🙌🏻

  • @omkargadekar52
    @omkargadekar52 6 місяців тому

    Thank you

    • @ataglanceofficial
      @ataglanceofficial  6 місяців тому

      You are most welcome 🤗 Please Share it with your friends 😁

  • @satyamrathor9789
    @satyamrathor9789 Місяць тому +1

    wonderful explanation

    • @ataglanceofficial
      @ataglanceofficial  Місяць тому +1

      Thank you so much 😊 Please Share it with your friends too ♥️😉

  • @ashishpandey2002
    @ashishpandey2002 6 місяців тому

    Thank you