Predict maintenance costs and component failure risks for cars using machine learning and real-world data.
� Live Demo: Try the Dashboard (Deploy to get this link)
- 🚗 40+ Car Models: Including luxury (BMW, Audi, Mercedes) and electric vehicles
- 🤖 ML Predictions: RandomForest models for cost prediction and failure classification
- 📊 Interactive Dashboard: Streamlit web interface with real-time predictions
- 🔄 Car Comparison: Compare maintenance costs between different vehicles
- ⛽ 6 Fuel Types: Petrol, Diesel, CNG, Electric, Hybrid, LPG
- 🧠 Smart Recommendations: AI-powered maintenance advice based on usage patterns
AI_Car_Maintenance_Predictor/
├── data/
│ ├── raw/ # Raw scraped data
│ └── processed/ # Cleaned and feature-engineered data
├── src/
│ ├── scraper.py # Web scraping scripts
│ ├── preprocess.py # Data cleaning and feature engineering
│ ├── train_model.py # ML training (regression/classification)
│ └── utils.py # Helper functions
├── app/
│ └── dashboard.py # Streamlit dashboard
├── requirements.txt # Python dependencies
└── README.md
-
Install dependencies:
pip install -r requirements.txt
-
Run the data pipeline:
# Step 1: Scrape data (optional - sample data included) python src/scraper.py # Step 2: Preprocess data python src/preprocess.py # Step 3: Train models python src/train_model.py
-
Launch dashboard:
streamlit run app/dashboard.py
- Scraping: Collect car maintenance discussions from forums
- Preprocessing: Clean data and engineer features
- Training: Build ML models for cost and failure prediction
- Prediction: Use dashboard for interactive predictions
- Input car details (model, mileage, age, fuel type)
- Get maintenance cost predictions
- View component failure risk analysis
- Explore data visualizations
- Cost Prediction: RandomForestRegressor for maintenance cost estimation
- Failure Classification: RandomForestClassifier for component failure risk
- Features: Mileage, age, fuel type, usage patterns, service history
- Cost Prediction: Mean Absolute Error (MAE), R² Score
- Failure Prediction: Accuracy, Precision, Recall, F1-Score
- More data sources (manufacturer websites, service centers)
- Advanced ML models (XGBoost, Neural Networks)
- Real-time data updates
- Mobile app interface
- AI-powered insights with LangChain + OpenAI
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Cost Prediction: MAE ₹1,660 | R² Score 0.822 (82% accuracy)
- Failure Classification: 100% accuracy on test data
- Cross Validation: R² Score 0.624 ± 0.569
This project is open source and available under the MIT License.
Jason William
- GitHub: @Jasonwill2004
- Project Link: AI Car Maintenance Predictor
⭐ Don't forget to give this project a star if you found it helpful!
Built with ❤️ using Python, Scikit-learn, and Streamlit
