An end-to-end machine learning application that assesses, predicts, and improves individual sustainability ratings based on lifestyle choices. By analyzing factors like diet, energy consumption, and waste disposal, EcoRate provides actionable, AI-driven recommendations to help users reduce their ecological footprint.
Institution: School of Computer Science and Engineering, Bennett University
Domain: Machine Learning, Full-Stack Development, AI Integration
While carbon footprint calculators exist, they often look at isolated metrics. EcoRate bridges the gap between awareness and actionable guidance by providing a holistic view of personal sustainability.
We combined a robust Gradient Boosting Regressor model with a modern Next.js dashboard and ChatGPT API integration. This allows users not only to see their current sustainability score but also to receive personalized, AI-generated tips on how to improve it based on their specific habits.
- Holistic Sustainability Scoring: Analyzes diverse lifestyle factors (diet, transportation, energy, waste) to generate a comprehensive rating.
- AI-Powered Recommendations: Integrates the ChatGPT API to provide personalized, actionable tips for improving sustainability scores.
- Interactive Dashboard: A modern, responsive UI built with Next.js and ShadCN for seamless data visualization and user interaction.
- Data-Driven Insights: Visualizes feature importance, revealing exactly which habits (e.g., diet vs. energy) have the highest impact on a user's score.
EcoRate is built on a decoupled, modern architecture designed for scalability and a smooth user experience:
graph LR
A[Next.js Frontend<br/>ShadCN Dashboard] <-->|User Input & Insights| B(Supabase<br/>Backend & Auth)
B -->|Lifestyle Data| C[Scikit-Learn Model<br/>Gradient Boosting]
B -->|User Context| D[ChatGPT API<br/>Personalized Tips]
C -->|Predicted Rating| B
D -->|AI Recommendations| B
style A fill:#e9e7dc,stroke:#333,stroke-width:2px
style B fill:#d6d4c4,stroke:#333,stroke-width:2px
style C fill:#a4a18c,stroke:#333,stroke-width:2px,color:#fff
style D fill:#a4a18c,stroke:#333,stroke-width:2px,color:#fff
| Layer | Technologies |
|---|---|
| Frontend | Next.js, React, Tailwind CSS, ShadCN UI |
| Backend & Database | Supabase (PostgreSQL, Auth, Edge Functions) |
| Machine Learning | Python, Scikit-learn, Pandas, NumPy |
| AI Integration | OpenAI API (ChatGPT) |
| Visualization | Matplotlib, Seaborn, Recharts |
We evaluated multiple regression models to predict the sustainability rating. The Gradient Boosting Regressor yielded the best performance:
- R-squared (R²):
0.7088(Explains ~71% of the variance in sustainability scores) - Mean Squared Error (MSE):
0.7319
Correlation analysis and feature importance graphs revealed that Dietary Habits and Energy Source Usage are the primary determinants of a user's overall sustainability score, significantly outweighing factors like basic waste disposal.
- Node.js 18+
- Python 3.10+
- Supabase account (for backend services)
- OpenAI API Key (for AI recommendations)
# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install Python dependencies
pip install -r requirements.txt
# Run the ML training/evaluation script
python train_model.pycd frontend
npm install
npm run devThe dashboard will be available at http://localhost:3000. Ensure your Supabase credentials and OpenAI API keys are configured in your .env.local file.
To further scale EcoRate's impact, the following enhancements are planned:
- Gamification: Introduce progress tracking, streaks, and badges to incentivize eco-friendly actions.
- IoT Integration: Link with smart home devices to gather real-time, automated data on energy and water usage.
- Granular Data: Incorporate seasonal impacts and regional carbon footprint metrics for hyper-local accuracy.
- B2B Expansion: Scale the system to offer organizational sustainability ratings and recommendations for businesses.
This project was developed for the Statistical Machine Learning course (CSET211) at Bennett University. We extend our deepest gratitude to our mentor, Dr. Ashima Yadav, for her invaluable guidance and support throughout the development of this system.
Building production systems that are fast, scalable, and real.