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 simple linear regression on a dataset of fuel consumption and CO2 emissions, plotting the relationship between engine size and emissions. The code uses scikit-learn to split the data into training and test sets, then fits a regression line to predict emission values. Using matplotlib and pylab, it visualizes the training data, the regression line, and the test data points to evaluate the model's accuracy. The dataset originates from a CSV file downloaded via wget from IBM Object Storage.

AI-generated description

Similar vizzes