Math in Python

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

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

  • @JoseRamos-nu8kd
    @JoseRamos-nu8kd 6 หลายเดือนก่อน

    As a computer science engineer with a minor in mathematics, I recommend Paul Orland's book, "Math for Programmers"

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

      Thanks for your comment!
      There are certainly a ton of great resources out there to learn about doing math with code. Thanks for sharing

  • @drak4188
    @drak4188 7 หลายเดือนก่อน +1

    Jake's sadistic side finally comes out 🤣 I left school 50yrs ago mate 😋

    • @jakeeh
      @jakeeh  7 หลายเดือนก่อน +1

      When you need to calculate the coordinates of a circle you’ll thank me 😂 (I had to do this recently)

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

    Thats cool! I had no idea python had libraries for this ( I knew about the basics). Thanks for the video!

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

      Happy you enjoyed it! :)

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

    I like th video only suggestion. You showed the derivative as you actually calculated it it as like 4x + 6 or whatever is was. But you don't actually need to calculate to plot the slope. The f(x+h)/h calculates the derivative as you had shown so you can create a function that will produce 4x+6 if you are unable to manually solve the derivative. This can be especially useful for harder problems that may or may not actually have derivatives that a human can solve

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

      Great point! Thanks for your comment

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

    Um, let's manage expectations here. If you want to do AI in python, you need a _lot_ of maths. Well actually, you just need a subset of maths called linear algebra. Terrible name for something unbelievably beautiful. You can make hyperdimensional spaces which solve problems geometrically. Believe it or not it's Turing Complete; that's to say it can solve anything calculable; that's without a neural net but obviously NN's are LA constructs. You need calculus too and factorisation and stuff like that.

    • @jakeeh
      @jakeeh  6 หลายเดือนก่อน +1

      Absolutely! This video isn’t meant to be a ‘how to do all math in Python’, but an introduction into some of the math you can do.
      I took linear algebra and calculus courses in university, and while I agree they can seem elegant when things click, it’s a difficult subject for some people. Although like most things, if you keep practicing you can understand it.

    • @tophat593
      @tophat593 6 หลายเดือนก่อน +1

      @@jakeeh Oh god yeah, I've probably put 500hrs of study into it over the last three years - I worked through all 144 Khan academic videos doing the workings twice and that was just the appetiser - and there's still a huge citadel over the horizon. That said, I can make a 3D graphics engine / code an NN from scratch so it's not like what I've learned is useless. Just spectral decomposition is... Well, I'm slowly getting there.
      The weird thing is that it's only reducing things to simple geometry to solve problems. It genuinely is simple at its heart.
      But anyway, I wasn't meaning to detract from your video, it was very good.

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

      That's amazing! Thanks again for your comment :) Always good to hear different opinions and perspectives on things.

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

    # explain this.
    # human says 0.7 + 0.6 = 1.3
    # python says 0.7 + 0.6 = 1.2999999999999998
    # you'll be surprised when you run it tru a for-loop , x+y and increment x by 1.

    • @jakeeh
      @jakeeh  6 หลายเดือนก่อน +1

      Oh yeah! That’s an interesting one. All because of a base 2 number not being properly represented :)

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

      Yep, python dealing with floats is not precize. Python flawed?
      Found it the hard the way,
      in a while loop i was expecting 3 loops but only got 2.
      My programming was rusty, so me first thinking should i use while instead for ... but still wrong, range+1? No. range-1? No. WTF?
      To properly deal with it i tried.
      x,y = 0.7, 0.6 ; x+y # as it should work!
      x,y,k = 0.7, 0,6, 1 ; (x*k+y*k)/k # this only shuffles the prob, k as 1 or 10 or 3 , never a 100% solution
      Then splitting before/after decimal point (splitting a string, two integers) does solve but the extra code is just stupid.
      Eventually ended up with for this perticular case. Other cases i went back to C++, even briefly considered going back further .. to assembly (can you guess my age :).
      import Decimal
      x,y = Decimal('0.7'),Decimal('0.6') ; x+y # still, using a string as temp just feels like bad programming
      Did find a proper explanation but can't remember the source.