A regression pipeline to predict used-car prices based on vehicle attributes, using linear models and visual diagnostics.
The analysis begins by loading the car_price.csv
dataset into pandas and previewing its first rows . After checking for missing values and computing basic descriptive statistics , the features and target (price
) are split into train and test sets via train_test_split
. A LinearRegression
model is then fit to the training data, predictions are made on the test set, and performance is quantified through R², MAE, and MSE metrics . Finally, results are visualized with a scatter plot of actual vs. predicted prices and feature-price relationships (e.g. City MPG vs. Price) via seaborn .