Skip to content

MrInfaith/Online-transaction-fraud-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

  • This project is related to the Online fraud In finanace.
  • The Objective of this Project is detect the fraud .
  • The dataset contains more than 6 lakhs rows.
  • Most of columns is equal to zero.
  • The dataset is Imbalanced .

WITHOUT Handling imbalanced dataset:-


Best Model:-

  1. Decision Tree :-
Class Precision Recall F1-Score Support
0 1.00 1.00 1.00 1,876,979
1 0.88 0.84 0.86 2,443
Accuracy - - 1.00 1,879,422
Macro Avg 0.94 0.92 0.93 1,879,422
Weighted Avg 1.00 1.00 1.00 1,879,422
  1. Random Forest :-
Class Precision Recall F1-Score Support
0 1.00 1.00 1.00 1,876,979
1 0.94 0.70 0.81 2,443
Accuracy - - 1.00 1,879,422
Macro Avg 0.97 0.85 0.90 1,879,422
Weighted Avg 1.00 1.00 1.00 1,879,422

Handling Imbalaced Dataset


  1. Undersampling: Best Model:-
  • Decision Tree:- Too Bad for precison and f1-score
Class Precision Recall F1-Score Support
0 1.00 0.99 0.99 1,876,979
1 0.09 1.00 0.17 2,443
Accuracy - - 0.99 1,879,422
Macro Avg 0.55 0.99 0.58 1,879,422
Weighted Avg 1.00 0.99 0.99 1,879,422

  1. Oversampling Best Model:-
  • Decision Tree :-
Class Precision Recall F1-Score Support
0 1.00 1.00 1.00 1,876,979
1 0.86 0.80 0.83 2,443
Accuracy - - 1.00 1,879,422
Macro Avg 0.93 0.90 0.92 1,879,422
Weighted Avg 1.00 1.00 1.00 1,879,422

  1. SMOTE Best Model:-
  • Decision Tree :-
Class Precision Recall F1-Score Support
0 1.00 1.00 1.00 1,876,979
1 0.61 0.97 0.75 2,443
Accuracy - - 1.00 1,879,422
Macro Avg 0.81 0.99 0.88 1,879,422
Weighted Avg 1.00 1.00 1.00 1,879,422

  1. Ensemble technique:
  • BalancedRandomForestClassifier: Precision and F1-score is too bad
Class Precision Recall F1-Score Support
0 1.00 0.98 0.99 1,876,979
1 0.07 1.00 0.13 2,443
Accuracy - - 0.98 1,879,422
Macro Avg 0.53 0.99 0.56 1,879,422
Weighted Avg 1.00 0.98 0.99 1,879,422
CONCLUSION
  • The decision tree is working well for all cases . We can use decision tree models for predictions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published