The first step in building a regression model with Keras is to get the data. In this case, we will be using the Auto MPG dataset. The Auto MPG dataset contains data on 392 cars from the 1970s and 1980s. The data includes the following features:
- MPG: Fuel efficiency in miles per gallon
- Cylinders: Number of cylinders in the engine
- Displacement: Engine displacement in liters
- Horsepower: Horsepower of the engine
- Weight: Weight of the car in pounds
- Acceleration: 0-60 mph acceleration time in seconds
- Model Year: Year the car was made
- Origin: Country where the car was made
We can download the Auto MPG dataset from the UCI Machine Learning Repository. Once we have downloaded the dataset, we can load it into a Pandas DataFrame.
import pandas as pd
# Load the data
dataset = pd.read_csv('auto-mpg.data')
The `dataset` DataFrame now contains all of the data from the Auto MPG dataset. We can use this data to build a regression model to predict fuel efficiency.