Skip to content

Glossary: Calculus for ML

np.polyfit

Also written: polyfit, least squares

A NumPy function that fits a polynomial to data directly using least squares. `np.polyfit(x, y, 1)` fits a line, and gradient descent found the same line.

Where the book teaches it

Related terms

Gradient descentPolynomial