abhisheks008 / ML-Crate

ML-Crate stands as the ultimate hub for a multitude of exciting ML projects, serving as the go-to resource haven for passionate and dedicated ML enthusiasts!🌟💫 Devfolio URL, https://devfolio.co/projects/mlcrate-98f9
https://quine.sh/repo/abhisheks008-ML-Crate-409463050
MIT License
180 stars 215 forks source link

Fastag Fraud Detection System #688

Open Harshit-code-tech opened 3 days ago

Harshit-code-tech commented 3 days ago

Pull Request for ML-Crate 💡

Issue Title: FastTag Fraud Detection

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:

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

Checklist: ☑️

github-actions[bot] commented 3 days ago

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

abhisheks008 commented 2 days ago

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.

Harshit-code-tech commented 2 days ago

@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.