Least Squares Approximation

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

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

  • @abdulaziz.j1505
    @abdulaziz.j1505 2 ปีที่แล้ว +18

    cut him some slack. it make me feel good sometimes that MIT students and professors makes silly mistakes which is normal by the way!!. the most important part is the learning process

  • @MrJKostyal
    @MrJKostyal 4 ปีที่แล้ว +133

    "i'm gonna rush through this because you should know how to multiply by now"
    *does it wrong*
    LOL

  • @bridge5189
    @bridge5189 4 ปีที่แล้ว +84

    Thanks for this problem solving and the methodology presented, but there is an error in the solution during multiplication of A_transpose with A. This error accumulates over time in the solution and results in the wrong answer. The correct answer should be y= 5/22 x^2 + 41/22 x

    • @turokg1578
      @turokg1578 2 ปีที่แล้ว +6

      goat comment

    • @ACh389
      @ACh389 7 หลายเดือนก่อน

      Computation is something that everybody is supposed to do on their own. What one really cares about are the ideas implemented to solve a problem. The remaining things seems to be of second grade.

    • @lisastegnii50
      @lisastegnii50 6 หลายเดือนก่อน

      Thanks for leaving the comment! I had a little different A and b (points in another order) and it's good to know i got to the right answer!

  • @rodolfo1654
    @rodolfo1654 3 ปีที่แล้ว +29

    Hello everyone! The answer to A^T A is 18 at the 2,2 entry

    • @iharsh386
      @iharsh386 11 หลายเดือนก่อน +1

      yes

  • @almonteros
    @almonteros 6 ปีที่แล้ว +57

    Where is the 10 coming from? Shouldn't it be 18?

    • @Rhinozekon
      @Rhinozekon 6 ปีที่แล้ว +14

      Yes it should. The correct solution is then y = (41/22)*c + (5/22)*d^2. You can also see this if you plot both equations against the given points.

    • @omersayli
      @omersayli 5 ปีที่แล้ว

      @@Rhinozekon y=(81/22)*c + (-25/22)*d^2

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

    I was not really doubting myself but I did not like it. This guy should know, right?! Anyway, answers I got were : C = 41/22 & D = 5/22.
    Thank you all!!!!!

    • @tsm784
      @tsm784 4 ปีที่แล้ว

      Yep

  • @JinxiLiu-e2b
    @JinxiLiu-e2b 5 หลายเดือนก่อน

    It's still a nice example, I've never thought concepts of linear algebra could come together like this

  • @AbhishekYadav-bu9pb
    @AbhishekYadav-bu9pb 3 ปีที่แล้ว +4

    y = 2.3*x - 0.1*x^2 fits much more correctly.

    • @ItsMeTheUser
      @ItsMeTheUser 11 หลายเดือนก่อน

      True, is it the best ?

  • @MVerma-g1j
    @MVerma-g1j 3 หลายเดือนก่อน

    I am still not able to get why we took square of 1st column as the 2nd column in A

  • @mllo2003
    @mllo2003 6 ปีที่แล้ว +12

    This is a nice example. But it's a pity that there seems to an calculation error In the derivation of the projection matrix There should be an 18 instead of 10 in the matrix. And C and D should be 41/22 and 5/22, leading to (e1, e2, e3)=(-12/11, 4/11, -4/11) if my calculation is correct. If, as calculated in the video, C and D were indeed 11/2 and -5/2, then you would have (e1, e2, e3)=(-2, 4, 6). That didn't look like a "least mean square error".

    • @anyangli918
      @anyangli918 4 ปีที่แล้ว +3

      Correct! Right answer should be b = 5/22 x^2 + 41/22

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

    A'A would result in (6 8; 8 18).

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

    There is a computation error in one of the steps. Final answer should be: (82/44, 10/44).
    To verify:
    import numpy as np
    from numpy.linalg import lstsq
    # Given points
    points = np.array([(1, 1), (2, 5), (-1, -2)])
    # Separate x and y values
    x = points[:, 0]
    y = points[:, 1]
    # Set up the design matrix for a quadratic fit y = ax^2 + bx
    X = np.vstack([x, x**2]).T
    # Perform least squares fitting
    coefficients, _, _, _ = lstsq(X, y, rcond=None)
    print(coefficients)
    print(np.round([82/44, 10/44], 8))
    Output:
    [1.86363636 0.22727273]
    [1.86363636 0.22727273]

  • @the_eternal_student
    @the_eternal_student 3 หลายเดือนก่อน

    What 3 points is he talking about at the end?

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

    I got the same answer, he made an error accidentally

  • @Izma-ku8ms
    @Izma-ku8ms 8 หลายเดือนก่อน

    Will be always take square of first elements of A?

  • @santagill3566
    @santagill3566 ปีที่แล้ว

    Problem13 . If e components of e=b−Ax averages to zero, then so does ( A^T * A)^(−1) * A^T * e. Why?

  • @quantfund2002
    @quantfund2002 5 ปีที่แล้ว +1

    shouldn't have rushed A transpose A

  • @jacksonmadison9994
    @jacksonmadison9994 ปีที่แล้ว

    why not make it a quadratic in the form of ax^2 + bx + c?
    instead of coefficients of only the 2nd and 1st power

    • @raymondgideon6295
      @raymondgideon6295 11 หลายเดือนก่อน +1

      because the curve is through the origin thus C the y-intercept is zero

  • @isaacmandell-seaver7223
    @isaacmandell-seaver7223 3 ปีที่แล้ว +1

    TH-cam comments to the rescue. I thought I was going insane.

  • @gowrithampi9751
    @gowrithampi9751 4 ปีที่แล้ว

    Correct me if I'm wrong, but isn't an equation of the form ax^2 + bx + c = 0, isn't y = ax^2 + bx + c just a quadratic function. I know it should be obvious, but it threw me off a bit, I wrote the equation and realized quickly that only two values of x were even possible :D

    • @ИльяЛомоносов-ю3м
      @ИльяЛомоносов-ю3м 3 ปีที่แล้ว +1

      This quadratic function goes through the origin, so c must be zero (there is no shift).

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

      @@ИльяЛомоносов-ю3м Why? Linear has a non-zero intercept, why not quadratic? the three points fits perfectly(0 error)

    • @maxim_ml
      @maxim_ml 2 ปีที่แล้ว +3

      @@faizanmansoori The definition of the problem says "find a quadratic equation *through the origin*"

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

    Why did he choose the quadratic function?

  • @omersayli
    @omersayli 5 ปีที่แล้ว +3

    yes, 10 should be 18, and the correct formula is y=(81/22)*c + (-25/22)*d^2

    • @chotirawee
      @chotirawee 4 ปีที่แล้ว +5

      I think it's more like
      [6 8; 8 18] [c; d] = [13; 19]
      then c = 41/22
      d = 5/22
      y = (41/22)*t + (5/22)*t^2

    • @RaselAhmed-ix5ee
      @RaselAhmed-ix5ee 3 ปีที่แล้ว

      @@chotirawee how did you get that 41 please explain

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

      ​@@RaselAhmed-ix5ee it's taken as
      Eq1 and eq 2 for c and d variables.
      Where it gets the answer by using substitution.

    • @RaselAhmed-ix5ee
      @RaselAhmed-ix5ee 2 หลายเดือนก่อน

      @@shironoyami7002 thanks for the quick reply, I am father now not a student anymore

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

      @@RaselAhmed-ix5ee bro I just saw it by chance now.
      I searched it up because tomorrow is my exam.I tried to search answer too because I didn't understand like how you were back then.
      And I leave an answer simply for someone else to read it instead of the purpose of replying to your question....
      Congrats man.👏

  • @Nachiket_upadhye_23
    @Nachiket_upadhye_23 6 ปีที่แล้ว

    how to choose what kind of equation that is?

    • @benjaminfrank9294
      @benjaminfrank9294 6 ปีที่แล้ว +6

      quadratic means y=ax²+bx+c
      through the origin means y(0)=0 so c=0

  • @Abhi-qi6wm
    @Abhi-qi6wm 4 ปีที่แล้ว

    Isn't it supposed to be x and not x-hat at 3:35? My reasoning is cause x-hat is the best answer we can get and x is the perfect answer.

    • @bahadrpolat5984
      @bahadrpolat5984 3 ปีที่แล้ว +2

      @CoeusQuantitative why so serious

  • @vlogsvonfelix1625
    @vlogsvonfelix1625 ปีที่แล้ว

    Ehren Mann

  • @prabhasvedagiri9338
    @prabhasvedagiri9338 10 หลายเดือนก่อน

    MIT lectures >>>>>> anyone else tryna teach

  • @eduardosdelarosa5539
    @eduardosdelarosa5539 5 ปีที่แล้ว +11

    He reminds me a person that i used to bully.

    • @nicksaba3882
      @nicksaba3882 4 ปีที่แล้ว +19

      And yet, he now has a Ph.D. from MIT and is now a professor of at Cornell, and you're... not.

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

      @@nicksaba3882 i'm happy XD

    • @jonpol770
      @jonpol770 3 ปีที่แล้ว +11

      Haha Eduardo trying to be hard on youtube while this lecturer is now a Prof at a prestigious university. Giad you're happy though Eddy x

    • @skydivenext
      @skydivenext ปีที่แล้ว

      @@jonpol770 if he has now phd in his field that just makes more to bully not less lol

    • @kingplunger1
      @kingplunger1 3 หลายเดือนก่อน

      You are pathetic

  • @JthElement
    @JthElement ปีที่แล้ว

    @ 5:17, it should be 18, not 10.

  • @fookinlookup5343
    @fookinlookup5343 3 ปีที่แล้ว

    n3rd