Skip to main content
100%

Created on Cognitive Class Labs

✓ Published0🌍 Public
DDAVINDER
Last edited Jun 1, 2019
Created on Jun 1, 2019

This example demonstrates polynomial regression by modeling the relationship between vehicle engine size and CO2 emissions using a fuel consumption dataset from Canada. It plots the data points and overlays a polynomial trend line to visualize the non-linear correlation. Using scikit-learn's `PolynomialFeatures` and `LinearRegression`, the notebook fits a model, then evaluates its performance on a test set. The visualization employs Matplotlib and pylab to render the scatter plot and regression curve, showing how increasing engine size correlates with higher emissions.

AI-generated description

Similar vizzes