Least Squares Fit and Graphing in Python

Поділитися
Вставка
  • Опубліковано 7 лют 2025
  • Here is how to make a least squares linear fit (linear regression) in python using numpy and matplotlib.pyplot.

КОМЕНТАРІ • 3

  • @fizixx
    @fizixx Рік тому +3

    Love linear regression. I have a few of these in python, with various amounts of 'bling', which I love too.
    In case you didn't know; in Colabs, if you have several code cells, you can put text cells above them, and add a title (or whatever you like), but if you do this, Colabs creates a Table of Contents (ToC). You access it by clicking on the three horizontal line in the upper left. What's nice about this is they are 'clickable'. So if you have a number of these text/code pairs, you can quickly find and access them using this ToC.
    For example: I have a bunch of Ohm's Law stuff. One for resistance, one for current, one for voltage, and then I added the various components in series, parallel and so on. By the time you're done you have a good collection of small and useful code pieces you can find quickly in the ToC.

  • @facefamousee
    @facefamousee 9 місяців тому +3

    beautiful. 👍thank you.👌

  • @chyldstudios
    @chyldstudios Рік тому +4

    I use sklearn.linear_model.LinearRegression for all my regression needs in Python. Statsmodels is cool too :)