2.4 Big O of K-nearest neighbors (L02: Nearest Neighbor Methods)

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ธ.ค. 2024

ความคิดเห็น • 8

  • @sinanstat
    @sinanstat 4 ปีที่แล้ว +2

    23:49 can we use Occam's window? We use it for choosing the models with higher posterior probabilities on the Bayesian Model Averaging.

    • @SebastianRaschka
      @SebastianRaschka  4 ปีที่แล้ว +2

      Yeah, I suppose you could, since you can interpret the fraction of number of neighbors from a given class over k (the number of neighbors) as the posterior probability, p(class=c | features).

    • @sinanstat
      @sinanstat 4 ปีที่แล้ว +1

      Sebastian Raschka
      I haven’t checked the literature yet. I have no idea how efficient would it be. It’s super efficient for our BMA model search algorithm. Let me do some research, this might be a good class project or even a paper if it hasn’t been done yet :)

  • @yixu2692
    @yixu2692 2 หลายเดือนก่อน

    Does knn need training? From the algorithm, i dont think knn needs training before prediction

    • @SebastianRaschka
      @SebastianRaschka  2 หลายเดือนก่อน

      Technically, in its simplest form, it doesn't. However, if you consider more efficient variants that use a ball-tree or kd-tree data structure to sub-partition the data for faster look-ups, then creating this data structure can be considered a form or training.

  • @matheussecco1
    @matheussecco1 2 ปีที่แล้ว +1

    Dear Sebastian,
    I think there is a typo in the notes (sebastianraschka.com/pdf/lecture-notes/stat451fs20/02-knn__notes.pdf) in page 11. It says complexity for KNN using priority queues is O(k*log(n)), while I guess it should be O(n*log(k)) according to your video lecture.

    • @SebastianRaschka
      @SebastianRaschka  2 ปีที่แล้ว

      Thanks for the note. It's been some time, but I think I updated the lecture notes later after making the video -- I think O(k*log(n)) is the correct one

    • @SanskarPatil-zq4vx
      @SanskarPatil-zq4vx 13 วันที่ผ่านมา

      @@SebastianRaschka was not it n*log k since priority queue has k elements at a time