March 29, 2024, 3:09 p.m. | Eve S

DEV Community dev.to

This tutorial is meant to provide a quick intro to a couple useful subjects: generating polynomial data, introducing noise to that data, creating a fit with the least squares method, and graphing the fit and data together with an R2 value. First, we are going to make some numpy arrays representing x and y coordinates for a line:



import numpy as np
x = np.linspace(0, 50, num=50)
y = np.linspace(0, 30, num=50)


Here x is an array that has 50 …

arrays data intro least matplotlib noise numpy polynomial squares together tutorial value

Data Architect

@ University of Texas at Austin | Austin, TX

Data ETL Engineer

@ University of Texas at Austin | Austin, TX

Lead GNSS Data Scientist

@ Lurra Systems | Melbourne

Senior Machine Learning Engineer (MLOps)

@ Promaton | Remote, Europe

Senior Principal, Product Strategy Operations, Cloud Data Analytics

@ Google | Sunnyvale, CA, USA; Austin, TX, USA

Data Scientist - HR BU

@ ServiceNow | Hyderabad, India