Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fastag Fraud Detection System #688

Merged
merged 2 commits into from
Jul 6, 2024

Conversation

Harshit-code-tech
Copy link
Contributor

@Harshit-code-tech Harshit-code-tech commented Jun 29, 2024

Pull Request for ML-Crate 💡

Issue Title: FastTag Fraud Detection

  • Info about the related issue (Aim of the project) : Implementing a machine learning model to detect fraudulent transactions in the FASTag system, enhancing security and efficiency in electronic toll collection.
  • Name: Harshit Ghosh
  • Email ID for further communication: harshitghosh7@gmail.com
  • GitHub ID: Harshit Ghosh
  • Idenitfy yourself: Social Summer Of Code Season 3 Contributor

Closes: #679

Describe the add-ons or changes you've made 📃

Implemented a machine learning pipeline for fraud detection in the FASTag system. Added feature engineering, model training, evaluation, and a Streamlit app for real-time predictions.

Type of change ☑️

What sort of change have you made:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested? ⚙️

The following steps were taken to test the FastTag Fraud Detection model:

  1. Unit Testing:

    • Developed and executed unit tests for functions and methods involved in data preprocessing, feature engineering, and model training.
    • Verified correct functionality for various inputs and edge cases.
  2. Integration Testing:

    • Conducted integration tests to ensure seamless interaction between components (data preprocessing, model training, and evaluation).
    • Tested the complete pipeline from data loading to model prediction.
  3. Model Evaluation:

    • Evaluated models using metrics such as F1 Score, Accuracy, and ROC AUC.
    • Implemented cross-validation to ensure model robustness and prevent overfitting.
  4. Hyperparameter Tuning:

    • Utilized Grid Search for hyperparameter tuning to optimize model performance.
    • Tested multiple combinations of parameters for each model.
  5. Exploratory Data Analysis (EDA) Validation:

    • Reviewed visualizations to confirm EDA findings, ensuring insights into data distribution and feature relationships.
  6. Web Application Testing:

    • Integrated the selected model into a Streamlit web app.
    • Conducted end-to-end testing to verify real-time fraud prediction functionality.
  7. Documentation Review:

    • Updated project documentation to reflect enhancements.
    • Ensured that instructions for running the model and understanding results are clear.
  8. Code Review:

    • Conducted a self-review of the code for adherence to project guidelines.
    • Added comments for complex sections to improve readability and maintainability.

Verification

  • Local Testing: Verified the functionality of all components locally.
  • Peer Review: Collaborated on peer reviews to gather feedback and identify potential issues.

Checklist: ☑️

  • My code follows the guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly wherever it was hard to understand.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added things that prove my fix is effective or that my feature works.
  • Any dependent changes have been merged and published in downstream modules.

Copy link

Our team will soon review your PR. Thanks @Harshit-code-tech :)

@Harshit-code-tech Harshit-code-tech changed the title Merging Fastag Fraud Detection System Jun 29, 2024
@abhisheks008
Copy link
Owner

Hi @Harshit-code-tech I have seen that you concluded SVM is the best fitted model but as per the accuracy scores it is the XGB, which is having the better accuracy.

@abhisheks008 abhisheks008 added Requested Changes ⚙️ Some changes have been requested in this PR. SSOC labels Jun 30, 2024
@Harshit-code-tech
Copy link
Contributor Author

@abhisheks008
sir as mentioned in readme...
SVM focuses on maximizing the margin between classes, which helps in creating a more defined decision boundary, reducing the risk of misclassification.

While XGBoost has a slightly better ROC AUC Score and comparable F1-Score and Accuracy, SVM’s performance is more balanced and may generalize better in real-world scenarios.

Copy link
Owner

@abhisheks008 abhisheks008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Approved @Harshit-code-tech

@abhisheks008 abhisheks008 added Approved ✅ This PR is approved by the PR or, Mentors. Advanced Points 40 - SSOC 2024 and removed Requested Changes ⚙️ Some changes have been requested in this PR. labels Jul 6, 2024
@abhisheks008 abhisheks008 merged commit af06f50 into abhisheks008:main Jul 6, 2024
1 check passed
@abhisheks008 abhisheks008 added the Points Added 🎉 This issue's points has been added to the leaderboard. label Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Advanced Points 40 - SSOC 2024 Approved ✅ This PR is approved by the PR or, Mentors. Points Added 🎉 This issue's points has been added to the leaderboard. SSOC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fastag Fraud Detection System
2 participants