Advanced Data Structures: K-D Trees

Поділитися
Вставка
  • Опубліковано 8 лис 2024

КОМЕНТАРІ • 30

  • @karthickpn450
    @karthickpn450 4 роки тому +35

    I have been trying to find a good tutorial for KD tree for quite sometime in UA-cam. Honestly, this was the best. If you could also do a follow up video and show the spatial representation of all the nodes and probably show a Nearest Neighbor search, that'll make this tutorial complete :) Thank you! :-)

  • @a91033
    @a91033 4 роки тому +14

    The most helpful tutorial on K-D trees I have found so far

  • @alejandroorregoroldan1012
    @alejandroorregoroldan1012 17 днів тому

    Nuevo seguidor, muy buen tutorial, ni los tutoriales en mi idioma los entendi tan bien como este👋

  • @fabianlobos557
    @fabianlobos557 4 роки тому +3

    I was looking for a good tutorial for this kind of tree, i will use it in my final thesis, so, thanks from Chile!

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

    I wish it included an example in the end where you showed how we could find point within a threshold, as in find the closest points to a target etc. great video though

  • @arnavanuj
    @arnavanuj 3 роки тому +1

    Good examples

  • @asmarali4167
    @asmarali4167 2 роки тому +1

    simplest tutorial on Kd trees I have come across.....

  • @GoogleUser-nx3wp
    @GoogleUser-nx3wp 2 роки тому

    Explanation so good🤩🤩🤩🤩🤩🤩

  • @minhcao6623
    @minhcao6623 3 роки тому +1

    Very clear explanation, thank you.

  • @xamogxusx
    @xamogxusx 4 роки тому +1

    top-notch tutrial!

  • @mingyangwang6274
    @mingyangwang6274 4 роки тому +1

    in the 3D example, what if we try to insert (10, 9, 8)? will the algorithm do nothing because of the duplicate element?

    • @niemasd
      @niemasd  4 роки тому +4

      Great question! In my videos on KD-Trees, I assumed we wouldn't run into any ties to keep things simple, but in the event of a tie, you would want to break the tie in a consistent manner. For example, in your example, you have a tie when comparing the x-dimension, you could break the tie by also looking at the y-dimension. if you have a tie again, you can break it using the z-dimension. If you have ties in all dimensions, you have a duplicate element, which you don't want to insert

  • @sreerammaramwira5513
    @sreerammaramwira5513 3 роки тому +2

    my college teacher made this seem like theory of relatively. but you, ..thanks vro.

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

    what to do if the numbers are same example: (19,34) and (19,45)

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

      Ties can be broken arbitrarily

  • @kritikaleet0049
    @kritikaleet0049 11 місяців тому

    Thanku sir

  • @gregg4
    @gregg4 4 роки тому

    I do wonder what the advantage would be of a kd tree versus a regular binary tree or some other data structure. It would take (roughly) the same number of operations to find an element since there are also two nodes (log base 2 of N). It doesn't look like you would necessarily achieve a better distribution of the data such that each branch would have the same number of levels. I fail to see why I would ever favour a kd tree over a binary tree.

    • @niemasd
      @niemasd  4 роки тому +1

      K-D trees are more useful for representing high-dimensional data and answering questions like "what are the closest points to this query?"

  • @UwUAroze
    @UwUAroze 12 днів тому

    if you look at your points in a different order, you'll have a different looking tree. does that matter..?

    • @niemasd
      @niemasd  12 днів тому

      @@UwUAroze That does indeed matter; great insight! 😄 Much like how, with a BST, you typically want to optimize the insertion order in some way to make the tree well-balanced, the same logic applies for K-D Trees. There are algorithms for building well-balanced K-D Trees from a given dataset; see here: en.wikipedia.org/wiki/K-d_tree#Construction

    • @UwUAroze
      @UwUAroze 12 днів тому

      @@niemasd oh so it matters from a standpoint of optimising the nns search/etc, but regardless of order it would be able to do the search with the correct answer?

  • @SivaBhargavRavella
    @SivaBhargavRavella 3 роки тому

    very helpful, thank you.

  • @joyh4
    @joyh4 2 роки тому

    What if its equal?

  • @mikesun5640
    @mikesun5640 4 роки тому

    lol I found out that this is no longer on the cse100 requirement :(

  • @ahmed_raaphat
    @ahmed_raaphat 3 роки тому

    Thanks :)

  • @__kpsingh__
    @__kpsingh__ 3 роки тому +1

    I have an exam in 13 minutes.

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

    Nós não conseguimos em portugues