Data Science, Machine Learning, Regression, Data Analysis, Statistics.
Generating synthetic data np.random.seed(0) x = np.random.rand(40, 1) * 4 - 2 # Random data points in range [-2, 2] y = x**2 - x + np.random.randn(40, 1) * 0.3 # Quadratic relationship with some noise Linear Regression (Underfitting) linear_model = LinearRegression() linear_model.fit(x, y)