0% found this document useful (0 votes)
8 views30 pages

Internship Experience at Dotch Endeavours

This report details an internship experience at Dotch Endeavours Private Limited, focusing on Artificial Intelligence (AI), Machine Learning (ML), and Full-Stack Development. The internship provided hands-on training in Python programming, data analysis, and project management, culminating in the development of an AI-based vehicle insurance fraud detection system. The experience enhanced technical skills, professional communication, and understanding of the software development lifecycle, preparing the intern for future career opportunities in the tech industry.

Uploaded by

letehiw350
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views30 pages

Internship Experience at Dotch Endeavours

This report details an internship experience at Dotch Endeavours Private Limited, focusing on Artificial Intelligence (AI), Machine Learning (ML), and Full-Stack Development. The internship provided hands-on training in Python programming, data analysis, and project management, culminating in the development of an AI-based vehicle insurance fraud detection system. The experience enhanced technical skills, professional communication, and understanding of the software development lifecycle, preparing the intern for future career opportunities in the tech industry.

Uploaded by

letehiw350
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Python with AI & ML

1. ABSTRACT

This report outlines the comprehensive internship experience undertaken at Dotch Endeavours
Private Limited, Mysuru. The internship was structured to provide real-world exposure to the
dynamic fields of Artificial Intelligence (AI), Machine Learning (ML), and Full-Stack
Development, integrating theoretical knowledge with practical implementation.

Dotch Endeavours, through its training initiative InternLeap, offered an industry-oriented


learning environment where I was involved in end-to-end project development. The program
encompassed foundational Python programming, core ML concepts, deep learning, project
planning, development, and final presentation. Under the mentorship of industry experts, I
gained hands-on experience with tools like NumPy, Pandas and Scikit-learn, along with best
practices in coding, model optimization, and version control using Git.

Throughout the internship, I developed technical proficiency, professional communication


skills, and a deeper understanding of project management in a software development lifecycle.
This report details the organization, training modules, projects, challenges encountered, and
outcomes achieved during this transformative learning experience.

Dept of CSE – AI & ML, 1


Python with AI & ML

2. INTRODUCTION

Internships serve as a vital bridge between academic knowledge and industry application.
They offer students the opportunity to gain hands-on experience, understand workplace
dynamics, and apply theoretical concepts in real-world scenarios. This report outlines my
internship experience at Dotch Endeavours Private Limited, a Mysuru-based software
company committed to delivering innovative technology solutions and fostering talent through
its initiative, InternLeap.

The primary goal of the internship was to provide practical exposure to Artificial Intelligence
(AI), Machine Learning (ML), and Full-Stack Development. The program was designed to
build both technical and professional skills through structured training, live project work, and
one-on-one mentorship from industry experts. InternLeap’s approach emphasized both
theoretical grounding and real-time application, creating a dynamic and engaging learning
environment.

Dotch Endeavours stands out for its learner-centric culture that promotes continuous growth
and creativity. The company empowers interns by encouraging independent thinking,
innovation, and practical experimentation. Interns are not just passive learners but active
contributors to real-world projects. This hands-on involvement enhanced my ability to work
with modern software development tools and understand how real business problems are
solved through technology.

Moreover, the internship encouraged a disciplined work ethic, effective time management, and
adaptability to fast-paced project demands. I learned to break complex problems into
manageable tasks and follow structured workflows using tools like Git and Jupyter
Notebooks. These skills, combined with regular feedback from mentors, helped me build
confidence in my capabilities and gave me a clearer perspective on career opportunities in the
tech industry.

This report aims to present a detailed overview of the internship journey, including the
organization’s background, work culture, training methodology, project experience, and key
outcomes. It serves as a reflection of the knowledge and skills I acquired and how this
internship has prepared me for future professional endeavors in the tech industry.

Dept of CSE – AI & ML, 2


Python with AI & ML

3. INDUSTRY PROFILE / COMPANY PROFILE

Dotch Endeavours Private Limited, established in 2023, stands as a privately held company
operating under a non-governmental classification, headquartered in Saraswathipuram,
Mysore. Their firm is duly registered at the Registrar of Companies, Bangalore, solidifying
their commitment to legal compliance and operational transparency within the industry. As a
leading software company, they specialize in crafting cutting-edge technology solutions
tailored to meet diverse business needs. Their commitment to excellence drives them to
deliver robust software products and services, empowering businesses to thrive in the digital
landscape. At Dotch Endeavours, they merge expertise with creativity to redefine possibilities
and drive tangible outcomes for their clients.

Dotch Endeavours initiated InternLeap, an independent platform designed to provide students


with immersive training opportunities and engagement in real-time industrial projects.
Additionally, through InternLeap, they offer skill-focused, hands-on training. Their expertise
spans across multiple domains including Full-Stack Web Development, Industrial
Automation, Product Design, Python & Deep Learning, Embedded Systems, Android/iOS
Development, and Cloud Computing, ensuring a comprehensive approach to skill enrichment
and professional development.

Dotch Endeavours' innovative approach is rooted in a deep understanding of industry trends


and a passion for solving real-world challenges through technology. By staying ahead of the
curve in emerging fields such as artificial intelligence, machine learning, and embedded
systems, the company ensures that its solutions are not only current but also scalable and
sustainable. This forward-thinking mindset enables clients to streamline operations, enhance
customer experiences, and gain a competitive edge in the digital economy.

The company’s culture encourages continuous learning, mentorship, and collaboration —


values that are clearly reflected in its internship programs. Through InternLeap, students and

Dept of CSE – AI & ML, 3


Python with AI & ML

young professionals gain direct exposure to the software development lifecycle, from problem
definition and dataset analysis to project implementation and final presentation. With a blend
of structured training, hands-on assignments, and expert mentorship, Dotch Endeavours
empowers future technologists to build confidence, technical depth, and industry-readiness.

By integrating quality service delivery with social responsibility in education and training,
Dotch Endeavours Private Limited has positioned itself as more than just a software company
— it is a growth enabler for both businesses and individuals in the tech ecosystem.

Products/Services by Dotch Endeavours:


Services Offered:
 End to end payment integration solutions (Razor pay, Paytm, PhonePe)
 Custom software development
 E-commerce solutions
 Quality Assurance and Testing
 Video calling API integration solutions

Products:
 MoneyLeap - Skill-Based online gaming platform.
 UserMetrics - Real time user testing software.
 Blue Collar Excellence- Availing global opportunities for skilled workforc

Dept of CSE – AI & ML, 4


Python with AI & ML

4. INTERNSHIP STRUCTURE AND WORK ENVIRONMENT

Training Program
Dotch Endeavours offers an immersive and well-structured internship program designed for
aspiring computer science professionals. The program integrates hands-on learning with
theoretical knowledge, encouraging students to work on real-time industry projects under the
guidance of experienced mentors. Interns are introduced to a range of current technologies
and tools, enabling them to build strong foundations in practical domains such as Full-Stack
Development, Artificial Intelligence (AI), Machine Learning (ML), and Cloud Computing.

The training methodology emphasizes experiential learning. Interns engage in live sessions,
coding assignments, and project-based tasks. Additionally, recorded video sessions are
provided for offline reference, allowing for flexible and self-paced learning. This blended
model of in-person interaction and digital learning helps bridge the gap between academia
and industry, equipping students with the confidence to apply their knowledge in real-world
scenarios.

Team Size
The internship was structured to be completed individually. Each intern worked independently
on their assigned tasks and projects while receiving one-on-one guidance from mentors. This
approach promoted self-reliance and helped sharpen individual problem-solving skills. It also
allowed me to better understand the software development lifecycle and enhanced my ability
to work with minimal supervision—an essential trait for any professional developer.

Work Culture
Dotch Endeavours fosters a positive and growth-oriented work culture. The organization
promotes autonomy and trust, empowering interns and employees alike to take initiative and
contribute meaningfully. Mentors and supervisors offer continuous support and maintain
open lines of communication to resolve doubts and encourage experimentation.

The environment is collaborative and welcoming, making it easy for interns to learn not just from
structured sessions but also by observing team interactions and workflows. Regular hands-on
sessions, live demonstrations, and feedback loops create a strong foundation for technical and
professional development.

Dept of CSE – AI & ML, 5


Python with AI & ML

Task Performed During Internship

Preliminary Technical Training Overview

Before diving into real-time project work, I underwent a structured pre-internship training
program conducted by Dotch Endeavours Pvt. Ltd. through their InternLeap platform. This
initial training was crucial in bridging the gap between academic knowledge and industry
requirements. It focused on building a strong foundation in Python programming and
familiarizing us with essential AI/ML tools and libraries. Key topics included variables, data
types, control structures, functions, and file handling. These core programming concepts
were reinforced through hands-on exercises like building calculators and assignments.

In addition to programming, we were introduced to vital data science libraries such as


NumPy, Pandas, and Matplotlib, enabling us to handle data manipulation, filtering, and
visualization. The training emphasized analyzing real-world datasets, performing statistical
computations, and plotting trends—an essential skill set for any machine learning workflow.
By the end of the training, I was comfortable writing efficient Python code, exploring
datasets, and visualizing insights using industry-standard tools.

This initial phase laid the groundwork for the weeks ahead and instilled confidence in
tackling more advanced topics such as supervised and unsupervised learning, neural
networks, and model optimization. The combination of theoretical sessions and practical
assignments allowed me to understand the development pipeline and prepared me to work
independently on AI/ML projects during the main internship period.

Dept of CSE – AI & ML, 6


Python with AI & ML

6. OBJECTIVES AND SCOPE OF THE STUDY

Objectives

The objective of this project is to develop an AI-based vehicle insurance fraud detection
system using machine learning techniques, particularly classification models like Random
Forest. By leveraging structured data processing and supervised learning, the system aims to
automatically detect and classify insurance claims as fraudulent or legitimate based on
customer demographics, vehicle information, and policy details. The primary goal is to assist
insurance companies in identifying potentially fraudulent claims at an early stage, thereby
enabling timely investigation, reducing financial losses, and improving operational efficiency.

Scope
The scope of this project includes the design, training, and evaluation of a machine learning-
based system capable of classifying vehicle insurance claims as either legitimate or fraudulent.
The system utilizes a structured dataset comprising customer demographics, vehicle details,
and policy-related information. The model is designed to be scalable, with potential
integration into web-based applications for real-time fraud detection and claims processing.
The project covers key stages such as data preprocessing, feature encoding, model selection,
and performance evaluation. Future enhancements may include integrating deep learning
models, deploying the system in production environments using web frameworks like
Streamlit, and incorporating advanced analytics features for fraud trend monitoring and risk
assessment.

Dept of CSE – AI & ML, 7


Python with AI & ML

7. THEORETICAL BACKGROUND

VISUAL STUDIO CODE

Visual Studio Code (VS Code) is a lightweight, versatile, and powerful Integrated
Development Environment (IDE) developed by Microsoft, widely used in data science and
machine learning projects, including the vehicle insurance fraud detection system. Known for
its speed, extensibility, and developer-friendly interface, VS Code streamlines the
development process through features like intelligent code completion, syntax highlighting,
debugging tools, and integrated terminal support.

One of the standout features of VS Code is its robust support for Python development through
the official Python extension. This enables seamless code navigation, linting, auto-formatting,
and debugging — essential for projects involving complex data preprocessing, model training,
and evaluation workflows. In fraud detection scenarios, where numerous features and
classification algorithms are involved, these capabilities significantly reduce development
time and debugging effort.

VS Code also integrates effortlessly with Git, making it easy to manage version control
directly within the IDE. Developers can clone repositories, manage branches, stage changes,
and commit updates—all from the source control panel. This is especially beneficial in
collaborative environments or internships, where code tracking and collaboration are vital.

For visualization and deployment, Streamlit was used to build an interactive web application
that connects the trained machine learning model with a user-friendly interface. VS Code's
integrated terminal and support for virtual environments (via pip) made it easy to manage
dependencies, run Streamlit applications, and test the model in real time. This combination
enabled a smooth transition from model development to deployment.

Additionally, VS Code supports extensions for Jupyter Notebooks, allowing developers to


write and execute notebook cells within the IDE — useful during the model experimentation
phase. This hybrid approach makes VS Code a one-stop solution for both scripting and
exploratory data analysis.

Dept of CSE – AI & ML, 8


Python with AI & ML

In summary, VS Code, paired with Streamlit, provides an efficient and modern development
environment for building the vehicle insurance fraud detection system. Its flexibility, rich
extension ecosystem, and seamless Python integration enabled rapid prototyping, effective
debugging, and deployment, making it ideal for AI/ML projects in real-world domains.

PYTHON

Python is a high-level, interpreted programming language renowned for its simplicity,


readability, and versatility, making it the preferred choice for a wide range of applications —
from web development and automation to advanced domains like data science, artificial
intelligence (AI), and machine learning (ML). Its clean syntax and extensive community
support have made it a cornerstone language in both academic research and industrial
applications.

In the context of machine learning projects like vehicle insurance fraud detection, Python
serves as the foundational language due to its rich ecosystem of libraries and frameworks. Its
support for structured, object-oriented, and functional programming paradigms allows
developers to build robust, scalable systems for processing structured data and training
predictive models.

Python’s strength lies in its powerful libraries tailored for data analysis, model development,
and evaluation. NumPy and Pandas are widely used for numerical operations, data
preprocessing, and exploratory analysis—critical steps when working with insurance-related
datasets that contain demographic, temporal, and categorical features. These libraries make it
easy to clean data, handle missing values, and prepare features for machine learning
pipelines.

For machine learning tasks, Python offers Scikit-learn, a comprehensive library that
simplifies the implementation of classification algorithms such as Logistic Regression,
Decision Trees, and Random Forests. These algorithms form the core of fraud detection
systems, enabling the identification of patterns in claim data that distinguish legitimate
claims from potentially fraudulent ones.

Additionally, Python supports advanced modeling through frameworks like TensorFlow and
Keras, which can be used to develop deep learning models for more complex fraud detection
tasks. These tools allow for easy model creation, training, evaluation, and deployment, while

Dept of CSE – AI & ML, 9


Python with AI & ML

also supporting GPU acceleration for faster computation on large datasets.

Dept of CSE – AI & ML, 10


Python with AI & ML

Visualization libraries such as Matplotlib and Seaborn further enhance Python’s utility by
enabling detailed data analysis and model performance tracking. Plots of confusion matrices,
feature correlations, and learning curves help diagnose issues like class imbalance and
overfitting—common challenges in fraud detection scenarios.

Deployment is another area where Python excels. With tools like Streamlit, developers can
create interactive web applications that serve machine learning models for real-time
predictions. In this project, Streamlit was used to build a user-friendly interface where claim-
related data is entered, processed, and evaluated by a trained model, returning an immediate
prediction—fraudulent or legitimate.

Python also integrates well with version control (Git), virtual environments, and cloud
platforms, making it suitable for both development and deployment. Its ecosystem supports
the entire ML lifecycle—from data ingestion and preprocessing to model training, evaluation,
and live prediction.

In summary, Python is the backbone of this fraud detection project, enabling efficient data
processing, model development, and web deployment. Its simplicity, flexibility, and robust
ecosystem of libraries make it an ideal language for building intelligent systems that address
real-world problems like insurance fraud.

Dept of CSE – AI & ML, 11


Python with AI & ML

8. RESEARCH METHODOLOGY

The Steps Involved As Follows

Data Collection

The first step in the research methodology is data collection, which plays a critical role in
training and evaluating the classification model used for vehicle insurance fraud detection.
The dataset utilized in this project is [Link], comprising of structured records
containing details such as customer demographics, accident history, vehicle information,
policy type, agent type, and the number of prior claims.

The dataset includes both legitimate and fraudulent claims, labelled accordingly to facilitate
supervised learning. Ensuring the accuracy and consistency of these labels is essential, as
mislabelled records can significantly degrade model performance. The collected data is
typically divided into two subsets — training and testing sets — in a split of 80% for training
and 20% for testing. This partitioning ensures that the model is trained on a substantial
portion of the data while retaining separate sets for unbiased evaluation and tuning.

Since the dataset includes various categorical and numerical features, preprocessing steps
such as encoding, scaling, and handling missing values are performed prior to model training.
This prepares the data for effective learning and ensures the robustness of the fraud detection
system across a wide range of real-world insurance claim scenarios.

Data Preprocessing

Once the dataset is collected, the next step is data preprocessing, which involves a series of
operations to clean and transform the structured data for input into machine learning models.
Libraries such as Pandas, NumPy, and Scikit-learn are typically used for this purpose. The
primary preprocessing tasks include:

 Encoding Categorical Variables: Categorical features like accident_area,


vehicle_category, policy_type, and fault are converted into numerical values using
techniques such as label encoding to make them suitable for model input.

Dept of CSE – AI & ML, 12


Python with AI & ML

 Handling Missing or Inconsistent Data: Missing values in the dataset are handled by
removing any rows that contain them using the dropna() method. This ensures data
integrity by eliminating incomplete records.
 Balancing the Dataset: To address the class imbalance between fraudulent and
legitimate claims, two techniques are explored:
o Random Oversampling: The minority class ( FraudFound = 1) is upsampled with
replacement to match the size of the majority class.
o Random Undersampling: The majority class (FraudFound = 0) is downsampled
without replacement to match the size of the minority class.
These techniques help the model generalize better and avoid bias toward the
majority class.
By applying these preprocessing steps, the dataset is cleaned, balanced, and transformed into a
structured format ready for classification. This preparation enhances the model’s ability to
accurately detect fraudulent insurance claims.

Model Architecture

For the vehicle insurance fraud detection task, a supervised machine learning classification
model is employed due to its effectiveness in handling structured tabular data. This project
uses classical machine learning algorithms such as Logistic Regression, Decision Trees, and
Random Forests—all of which are well-suited for binary classification problems like
identifying fraudulent versus legitimate claims.

The general architecture of the model pipeline follows these steps:

 Feature Input Layer: The dataset comprises structured features including age,
accident_area, policy_type, vehicle_category, number_of_past_claims, etc., which are
passed into the model after preprocessing and encoding.

 Model Selection and Training:

o Logistic Regression is used as a baseline model due to its simplicity and


interpretability.

o Random Forest, an ensemble learning method based on decision trees, is used


to improve accuracy by reducing overfitting and capturing non-linear feature
interactions.

Dept of CSE – AI & ML, 13


Python with AI & ML

o Hyperparameters such as the number of estimators and tree depth are tuned to
optimize performance.

 Evaluation Metrics: The model is evaluated using standard classification metrics such
as accuracy, precision, recall, and F1-score, which are particularly important in fraud
detection due to class imbalance.

The trained model is then integrated into a Streamlit-based web application, allowing users to
input claim-related data and receive instant predictions. This architecture ensures both
accuracy and real-time usability in fraud detection scenarios.

Training the Model

Training in this project involves feeding the preprocessed structured data into a supervised
machine learning model and updating the model parameters to minimize classification error.

The training process includes the following key steps:

 Data Splitting: The dataset is divided into training and test sets, typically in a 70:20
ratio. This allows the model to learn from a majority of the data while being evaluated
on unseen data to monitor performance.

 Model Fitting: Machine learning algorithms such as Logistic Regression and Random
Forest are trained using the training set. These models learn patterns in the data by
mapping input features (e.g., accident area, vehicle category, number of past claims)
to the target labels (fraudulent or legitimate).

 Preprocessing and Feature Encoding: Before model fitting, categorical variables are
encoded using label encoding, and feature scaling is applied using standardization.
These preprocessing steps are crucial for ensuring that features are numerically
compatible with the learning algorithms, especially Logistic Regression.

 Evaluation During Training: Model performance is continuously evaluated using


metrics such as accuracy, precision, recall, and F1-score on the validation set. These
metrics help assess how well the model distinguishes between fraudulent and
legitimate claims.

This structured training process ensures that the model is robust, generalizes well to new data,
and is optimized for deployment in real-world fraud detection scenarios.

Dept of CSE – AI & ML, 14


Python with AI & ML

Evaluation

After training, the model is evaluated on the test set to assess its ability to generalize to unseen
data. This step is crucial in determining the model’s effectiveness in identifying fraudulent
insurance claims.

Key evaluation metrics include:

 Accuracy: The proportion of correctly classified claims (both fraudulent and


legitimate) out of the total number of test samples. While useful, accuracy alone can
be misleading in imbalanced datasets.

 Precision, Recall, and F1-Score: These metrics provide deeper insight into performance:

o Precision measures how many of the claims predicted as fraudulent are


actually fraudulent.

o Recall (sensitivity) indicates how many of the actual fraudulent claims were
correctly identified.

o F1-Score is the harmonic mean of precision and recall, offering a balanced


view of performance—especially important in fraud detection, where false
negatives and false positives have significant consequences.

 Confusion Matrix: It is used to visualize model predictions across the two classes
(fraudulent and legitimate). It shows the number of true positives, true negatives, false
positives, and false negatives, helping identify where the model tends to misclassify.

These metrics collectively help assess the trade-offs between catching fraudulent claims and
minimizing the number of false alarms. This evaluation is critical for ensuring the reliability
and practical applicability of the fraud detection system.

Model Deployment

Once the model has been trained and evaluated, it is deployed as part of a real-time fraud
detection system. The deployment process involves integrating the trained machine learning
model into an interactive web application, enabling users (e.g., insurance agents or analysts)
to input claim-related information and receive instant predictions on whether a claim is likely
fraudulent or legitimate.

Dept of CSE – AI & ML, 15


Python with AI & ML

For real-time deployment, the model is embedded into a Streamlit-based web interface,
where users enter structured data such as customer demographics, vehicle type, policy
details, accident area, and prior claims. The application preprocesses the input data—
applying the same encoding and scaling transformations used during training—and then
feeds it into the trained model for classification. If the model identifies a potentially
fraudulent claim, the system displays a clear visual alert or status message, enabling quick
decision-making and reducing the need for manual review.

In summary, the deployment of the vehicle insurance fraud detection model via Streamlit
transforms it into a practical tool for real-time decision support, enhancing the efficiency and
accuracy of insurance claim assessments.

Dept of CSE – AI & ML, 16


Python with AI & ML

9. IMPLEMENTATION

In this project, Visual Studio Code (VS Code) was used as the primary Integrated
Development Environment (IDE) to write, test, and execute Python code. Python, being a
high-level, versatile programming language, provided access to essential libraries such as
Pandas, NumPy, Scikit-learn, Matplotlib, and Streamlit, which were critical for data
preprocessing, model building, evaluation, and deployment.

Setup and initialization

 Import necessary libraries and modules:

o pandas, numpy for data handling and manipulation.

o sklearn for model training, preprocessing, and evaluation.

o [Link] and seaborn for data visualization.

o streamlit for creating the web-based user interface.

 Load the vehicle insurance claim dataset using pandas.read_csv().

 Perform basic exploratory data analysis (EDA) to understand the distribution of


features and identify missing or imbalanced data.

Data Preprocessing and Feature Engineering

 Encoding categorical features using LabelEncoder or get_dummies for variables


like accident_area, policy_type, vehicle_category, etc.
 Standardization is applied using StandardScaler to normalize numerical features, improving
the convergence and performance.
 Splitting the dataset into training and testing sets (commonly 80:20).

Model Architecture and Training

 Train and compare multiple machine learning models, including:


o Logistic Regression
o Random Forest Classifier
 Use train_test_split from sklearn.model_selection for partitioning data.

Dept of CSE – AI & ML, 17


Python with AI & ML

Model Evaluation and Visualization


 A confusion matrix is constructed and visualized with [Link] to show true
vs. false classifications across both classes.
 Data Visuaalization:
o Correlation heatmaps.
o Feature importance (for tree-based models).
o Confusion matrix plots and performance metrics using Seaborn and Matplotlib.
 Evaluate models using:
o Accuracy
o Precision
o Recall
o F1-Score

Prediction and Real-Time Testing


 Use joblib to save and load the best-performing trained model.
 Build a Streamlit interface that allows users to:
o Input new insurance claim data through dropdowns and sliders.
o Submit the data and get real-time predictions (fraudulent or legitimate).
o Display model output along with a user-friendly result indicator.

User Interaction and Interface


 Implemented with Streamlit, the interface includes:
o Organized input fields for features like driver age, gender, policy type, and
past claims.
o Submit button to trigger prediction.
o Output display with alerts for fraudulent or legitimate results.

Dept of CSE – AI & ML, 18


Python with AI & ML

Work flow diagram

Fig: Workflow for Vehicle Insurance Fraud Detection

The flow diagram illustrates the end-to-end process of the Vehicle Insurance Fraud Detection
System. It begins with the input dataset, consisting of structured records that include details
such as customer demographics, vehicle information, policy type, accident history, and
previous claim counts. The data undergoes exploratory analysis and cleaning to handle
missing values and inconsistencies.

Dept of CSE – AI & ML, 19


Python with AI & ML

Next, the system performs feature encoding, transforming categorical variables into
numerical format using techniques like label encoding or one-hot encoding. This is followed
by a preprocessing stage, where numerical features are scaled and the dataset is prepared for
machine learning. The processed data is then split into training, validation, and test sets to
ensure unbiased evaluation.

Multiple machine learning models—such as Logistic Regression and Random Forest—are


trained on the training set and validated using the validation set to fine-tune parameters and
avoid overfitting. After selecting the best-performing model, it is evaluated on the test set
using metrics such as accuracy, precision, recall, F1-score, and a confusion matrix.

Finally, the trained model is integrated into a web-based interface using Streamlit, allowing
users to input claim-related information and receive real-time predictions. The system
classifies the claim as fraudulent or legitimate, providing a practical and efficient tool for
early fraud detection in vehicle insurance claims.
.

Dept of CSE – AI & ML, 20


Python with AI & ML

10. PSEUDO CODE

# USAGE
# python insurance_fraud_classifier.py

# Import necessary libraries


import pandas as pd
import numpy as np
import [Link] as plt
import seaborn as sns
from sklearn.model_selection import train_test_split
from [Link] import LabelEncoder, StandardScaler
from [Link] import RandomForestClassifier
from sklearn.linear_model import LogisticRegression
from [Link] import confusion_matrix, f1_score, accuracy_score
from [Link] import resample
import warnings

# Load dataset from CSV file


df = pd.read_csv("[Link]")

# Remove rows with missing values


[Link]()

# Encode categorical columns using LabelEncoder


for col in categorical_columns:
df[col] = LabelEncoder().fit_transform(df[col])

# Handle class imbalance using resampling (upsample minority class)


df_majority = df[[Link] == 0]
df_minority = df[[Link] == 1]

Dept of CSE – AI & ML, ATMECE, Mysuru 21


Python with AI & ML

df_minority_upsampled = resample(df_minority, replace=True, n_samples=len(df_majority))


df_balanced = [Link]([df_majority, df_minority_upsampled])

# Normalize or standardize feature values


scaler = StandardScaler()
X_scaled = scaler.fit_transform(df_balanced.drop('target', axis=1))

# Split data into training and testing sets


X_train, X_test, y_train, y_test = train_test_split(X_scaled, df_balanced['target'], test_size=0.2)

# Initialize Random Forest Classifier


model = RandomForestClassifier()

# Train the model on the training data


[Link](X_train, y_train)

# Make predictions using the trained model


predictions = [Link](X_test)

# Evaluate model using confusion matrix and metrics


conf_matrix = confusion_matrix(y_test, predictions)
accuracy = accuracy_score(y_test, predictions)
f1 = f1_score(y_test, predictions)

# Display performance results


print("Confusion Matrix:", conf_matrix)
print("Accuracy:", accuracy)
print("F1 Score:", f1)

Dept of CSE – AI & ML, ATMECE, Mysuru 22


Python with AI & ML

Description of the pseudo code

The provided Python script is a machine learning-based insurance fraud detection system. It
uses classical machine learning techniques—particularly the Random Forest Classifier—to
predict whether a vehicle insurance claim is fraudulent or legitimate based on customer and
claim details. Below is a breakdown of the script’s structure and functionality:

1. Importing Libraries
The script begins by importing essential Python libraries for data analysis, model building, and
visualization:
 pandas, numpy – for data loading and manipulation.
 [Link], seaborn – for plotting and EDA.
 sklearn modules – for preprocessing, model training, evaluation, and metrics.
These libraries form the core of the machine learning pipeline.

2. Loading and Cleaning the Dataset


The dataset is loaded using pandas.read_csv() from the [Link] file. It consists of
various features related to customers, vehicle claims, and policy details. Missing values are
handled using the dropna() method to ensure data consistency.

3. Encoding Categorical Features


The dataset includes categorical features such as accident_area, policy_type,
vehicle_category, etc. These features are encoded into numeric format using LabelEncoder
from [Link], which is essential for compatibility with machine learning
models.

4. Feature Scaling
StandardScaler is used to normalize the feature values. Scaling helps improve the
convergence and performance of certain machine learning algorithms. Feature scaling
ensures that features contribute equally to the model and helps improve performance for
algorithms like logistic regression.

5. Train-Test Split
The preprocessed and balanced dataset is split into training and testing subsets in an 80:20
ratio using train_test_split. This separation allows the model to be trained on a majority of the

Dept of CSE – AI & ML, ATMECE, Mysuru 23


Python with AI & ML
data while being evaluated on previously unseen examples.

Dept of CSE – AI & ML, ATMECE, Mysuru 24


Python with AI & ML

6. Model Building and Training


The model chosen is a Random Forest Classifier, which is robust and effective for structured
data problems. It is initialized and then trained on the training data using the fit() method.

7. Prediction and Evaluation


The trained model is evaluated using:
 Confusion Matrix
 Accuracy Score
 F1 Score
These metrics provide insights into model performance, especially in distinguishing between
legitimate and fraudulent claims.

8. Making Predictions on New Data


Once trained, the model is used to make predictions on test data using the predict() method.
These predictions are compared with actual labels to assess how well the model performs.

9. Saving the Trained Model


The trained model can be easily exported using Python's joblib for deployment in a Streamlit
web application.

This script represents a complete pipeline for structured fraud detection using classical
machine learning. It can be easily extended or embedded in production systems and is
particularly valuable for insurance companies to automate fraud detection, saving both cost
and time.

Dept of CSE – AI & ML, ATMECE, Mysuru 25


Python with AI & ML

11. OUTPUT

Figure 1: Web Application for Vehicle Insurance Fraud Detection

Figure 2: Input User Data

Dept of CSE – AI & ML, ATMECE, Mysuru 26


Python with AI & ML

Figure 3: Fraudulent Claim

Figure 4: Legitimate Claim

Dept of CSE – AI & ML, ATMECE, Mysuru 27


Python with AI & ML

12. RECOMMENDATION/SUGGESTIONS
 Integration with Insurance IoT and Telematics Systems: The fraud detection
model can be integrated with IoT and telematics data collected from vehicles and
driver behavior monitoring systems. Combining environmental and behavioral data
(e.g., location, speed, collision impact) with claim details can enable real-time fraud
alerts and more context-aware fraud detection.
 Incorporate More Advanced Feature Engineering Techniques: While the current
system relies on basic preprocessed features, implementing advanced feature
extraction (such as temporal patterns, claim frequency, anomaly scores) could
improve the model’s understanding of fraudulent behavior. Creating interaction terms
or embeddings from high-cardinality categorical variables can also enhance model
performance.
 Support for Multi-Class Fraud Detection: The system can be extended to handle
multi-class classification (e.g., “legitimate”, “suspicious”, “confirmed fraud”) or even
multi-label classification if different fraud types are recorded (e.g., personal injury
fraud, vehicle theft fraud). This granularity can help in prioritizing investigations.
 Cloud Deployment and API Integration: Deploy the trained fraud detection model
on cloud platforms such as AWS, Google Cloud, or Azure to enable scalable, real-
time claim validation. Integration with web portals or internal APIs can allow
insurance agents and systems to get immediate feedback on claim legitimacy.
 Partnership with Insurance Regulators and Analysts: Collaborating with
insurance companies, fraud investigators, and regulatory bodies can improve model
relevance. Real-world insights can be used to collect high-quality, diverse claim data
and label new fraud patterns, enhancing the model’s adaptability.
 Model Retraining and Continuous Learning: Implement active learning or
scheduled retraining mechanisms so that the model remains updated with new fraud
patterns. This is especially important in fraud detection, where fraudsters constantly
evolve their methods to bypass detection.
 Mobile App for Field Investigators: A mobile interface for insurance surveyors or
field investigators could be developed. They can input real-time claim information
and receive instant fraud risk assessments, aiding quick decision-making during claim
inspections or client interviews.

Dept of CSE – AI & ML, ATMECE, Mysuru 28


Python with AI & ML

13. CONCLUSION

The development of an AI-based vehicle insurance fraud detection system represents a


significant advancement in the field of intelligent automation within the insurance industry,
offering insurance providers a robust solution for early identification and mitigation of
fraudulent claims. By leveraging classical machine learning algorithms—particularly Random
Forest classifiers—and integrating them with streamlined data preprocessing pipelines, the
system demonstrates strong potential in classifying claims based on structured data
comprising customer, vehicle, and policy attributes.

This model aids in the timely detection of suspicious claims, enabling rapid investigation and
reducing the financial burden caused by fraudulent activities. Through the use of a real-time
Streamlit-based interface, the solution becomes practical and accessible, allowing users to
input relevant claim data and instantly receive predictions. Such proactive systems can
significantly boost the efficiency of fraud management processes and improve trust in the
insurance ecosystem.

Moreover, the deployment of this model lays the groundwork for more advanced integrations
with IoT-based vehicle monitoring systems, potentially enabling even more contextual and
real- time fraud detection capabilities. By minimizing manual effort and enhancing decision
accuracy, this system contributes to a smarter, more secure, and data-driven approach in the
insurance domain.

Despite its promise, the system's effectiveness depends on factors such as data quality, class
balance, and evolving fraud patterns. Regular retraining, continuous feature enhancement, and
incorporation of domain-specific knowledge are essential to maintain high performance and
adaptability. Nevertheless, with continuous improvement and real-world integration, this AI-
powered fraud detection tool holds the potential to revolutionize claim verification processes
and bring greater resilience and transparency to the insurance sector.

Dept of CSE – AI & ML, ATMECE, Mysuru 29


Python with AI & ML

14. BILBLIOGRAPHY

1. Phua, C.; Lee, V.; Smith, K.; Gayler, R. "A Comprehensive Survey of Data
Mining- based Fraud Detection Research." arXiv preprint arXiv:1009.6119, 2010.
2. Ngai, E.W.T.; Hu, Y.; Wong, Y.H.; Chen, Y.; Sun, X. "The application of data
mining techniques in financial fraud detection: A classification framework and an
academic review of literature." Decision Support Systems, 2011, Vol. 50, Issue 3,
pp. 559–569.
3. Kou, Y.; Lu, C.T.; Sirwongwattana, S.; Huang, Y.P. "Survey of fraud detection
techniques." IEEE International Conference on Networking, Sensing and Control,
2004, pp. 749–754.
4. Bhattacharyya, S.; Jha, S.; Tharakunnel, K.; Westland, J.C. "Data mining for
credit card fraud: A comparative study." Decision Support Systems, 2011, Vol.
50, Issue 3, pp. 602–613.
5. Bauder, R.A.; Khoshgoftaar, T.M. "A survey of data sampling and class
imbalance in big data for cyber security." Journal of Big Data, 2018, Vol. 5,
Article 1.
6. Bolton, R.J.; Hand, D.J. "Statistical fraud detection: A review." Statistical
Science, 2002, Vol. 17, Issue 3, pp. 235–255.
7. Sahin, Y.; Duman, E. "Detecting credit card fraud by decision trees and support
vector machines." Proceedings of the International MultiConference of Engineers
and Computer Scientists, 2011, Vol. 1, pp. 442–447.
8. Abdallah, A.; Maarof, M.A.; Zainal, A. "Fraud detection system: A survey."
Journal of Network and Computer Applications, 2016, Vol. 68, pp. 90–113.
9. West, J.; Bhattacharya, M. "Intelligent financial fraud detection: A comprehensive
review." Computers & Security, 2016, Vol. 57, pp. 47–66.
10. Carcillo, F.; Le Borgne, Y.A.; Caelen, O.; Bontempi, G. "Streaming active
learning strategies for real-life credit card fraud detection: assessment and
visualization." International Journal of Data Science and Analytics, 2019, Vol. 5,
Issue 4, pp. 285– 300.

Dept of CSE – AI & ML, ATMECE, Mysuru 30

You might also like