A full-stack web application for analyzing and predicting insurance agent performance using machine learning algorithms and interactive data visualizations.
-
Data Preprocessing:
- Selected relevant performance features such as new policy count, net income, conversion rates, and others.
- Normalized the data to ensure uniformity and scalability, preparing it for machine learning models.
-
K-means Clustering:
- Applied K-means clustering to categorize agents into performance levels (High, Medium, Low) based on their individual performance metrics.
-
PCA (Principal Component Analysis) Analysis:
- Performed PCA to reduce the dimensionality of the dataset, improving computational efficiency.
- Identified key performance indicators (KPIs) that contributed the most to clustering, facilitating better decision-making.
-
Cluster Ranking:
- Calculated composite scores for each cluster by assigning weighted importance to key performance features.
- Ranked the agents by their performance level (High, Medium, Low) based on the cluster scores.
-
Real-time Agent Performance Predictions:
Predict the performance level of agents based on the latest data. -
Interactive Data Visualizations:
Dynamic and interactive charts displaying agent performance trends, conversion rates, and other key metrics. -
Performance Distribution Analysis:
Visualize and analyze the distribution of agents across different performance levels (High, Medium, Low). -
Modern, Responsive UI:
A sleek and user-friendly interface built using Material-UI, designed for both desktop and mobile devices. -
RESTful API Backend:
A Python-based backend using FastAPI to handle requests and serve predictions.
Here’s a quick demo of the Agent Performance Analysis Dashboard:
- React 19
- Material-UI (MUI) v7
- Chart.js for data visualization
- React Router for navigation
- Axios for API communication
- Python
- FastAPI
- Pandas
- Scikit-learn
- NumPy
- Node.js (v14 or later)
- Python 3.7+
- npm or yarn
- pip
- Clone the repository:
git clone <repository-url>
cd <repository-directory>- Set up the frontend:
cd frontend
npm install- Set up the backend:
cd backend
pip install -r requirements.txt- Start the backend server:
cd backend
uvicorn main:app --reloadThe backend will be available at http://127.0.0.1:8000
- Start the frontend development server:
cd frontend
npm startThe frontend will be available at http://localhost:3000
.
├── frontend/ # React frontend application
│ ├── public/ # Static files
│ │ └── theme.js # Material-UI theme configuration
│ └── package.json # Frontend dependencies
│
└── backend/ # Python backend application
├── main.py # FastAPI application entry point
└── train.py # Machine learning model training
In the frontend directory, you can run:
npm start- Runs the app in development modenpm test- Launches the test runnernpm run build- Builds the app for productionnpm run eject- Ejects from Create React App
- Create React App for the frontend boilerplate
- Material-UI for the component library
- FastAPI for the backend framework
- Chart.js for data visualization
- Lasitha Amarasinghe
- Induwara Morawakgoda
- Thakshaka Rathnayake
