A simple algorithm to speed up repeated summations!

Поделиться
HTML-код
  • Опубликовано: 20 июл 2023
  • Need to repeatedly sum up values from sublists which are extracted from a bigger list? You could simply loop through the values each time, but you'll find that doing so gets pretty slow. Today, we look at a simple pre-processing step that saves you a ton of trouble in the long run! Plus, we take a brief look at how this also works in bigger dimensions.
    Want to see the code used in the video? Check out this repository: bitbucket.org/nerdfirst/quick...
    -----
    Want to contribute to the channel? Consider using the "Super Thanks" feature above, or visit my website at nerdfirst.net/donate to find alternative ways to donate. Thank you!
    -----
    Disclaimer: Please note that any information is provided on this channel in good faith, but I cannot guarantee 100% accuracy / correctness on all content. Contributors to this channel are not to be held responsible for any possible outcomes from your use of the information.

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

  • @logicweaver7152
    @logicweaver7152 5 месяцев назад

    Your content is top notch. Eagerly awaiting for more.

    • @NERDfirst
      @NERDfirst  5 месяцев назад

      Hello and thank you very much for your content! I'm always looking for opportunities to get back into making videos! It's difficult given my schedule but I'll try.

  • @JediMocro
    @JediMocro 5 месяцев назад

    Heel vet! Ben echt blij dat je video's blijft maken. Ga zo door!

    • @NERDfirst
      @NERDfirst  4 месяца назад +1

      Thank you very much, and great to hear from you again! It's been a long time since I've made a video, but I'm always looking for opportunities to go back to it!

  • @juliusfucik4011
    @juliusfucik4011 11 месяцев назад +4

    This technique has been used for decades in image processing. Converting the image into an integral image allows for very fast summation regardless of the summed over area.

    • @NERDfirst
      @NERDfirst  11 месяцев назад +4

      Hello and thank you for your comment! Yes indeed, that was the context where I first experienced it as well. You can really see it shine in a 2D context, but the core thought process is too good to not share!

    • @juliusfucik4011
      @juliusfucik4011 11 месяцев назад

      It is!
      I am new to the channel. You have earned a subscriber.
      I have implemented these integral images for classification of 14 channel multispectral images.
      Nowadays, it is a technique that is no longer needed, because you just throw it all into a CNN and throw lots of computational power at it and achieve better results.
      But it is still a valuable technique to learn and it still has many applications, even in the imaging realm.
      Those face detectors in phonecard cameras still work using integral images and Viola-Jones feature.

  • @KevinStaude
    @KevinStaude 11 месяцев назад +1

    Nice! I love those Python math optimization videos. I think they will be helpful with some Project Euler problems.

    • @NERDfirst
      @NERDfirst  11 месяцев назад

      Hello and thank you very much for your comment! Yeah, I particularly love these "pre-processing" ones. Such a simple way to make a bit of code significantly more efficient.

  • @md.uzairahmed7774
    @md.uzairahmed7774 Месяц назад

    Sir, please make more hardware slash robotics videos

    • @NERDfirst
      @NERDfirst  Месяц назад

      Hello and thank you for your comment! Yeah, I'd love to, this is a topic I enjoy. Got any specific topics you'd like to see?