AIML Mini-Project

Car Price Predictor

Enter a car's specifications and compare price predictions from two machine learning models trained on a synthetic dataset: Linear Regression and K-Nearest Neighbors.

Model R² — Linear: 0.886 · KNN: 0.918 · Training samples: 400

Car details

Predictions

Fill in the details and click Predict price to see both models' estimates.

How it works

  • A synthetic dataset of ~500 cars is generated with realistic price relationships (depreciation by age, mileage penalty, engine & power premium, fuel/transmission effects).
  • Linear Regression is fit in-browser via the normal equation on standardized features.
  • KNN (k=5) averages the price of the 5 most similar cars using Euclidean distance on the same feature space.