Answers.Body: <p>I believe that the idea is to have a similar ratio of fraud/"normal transaction" as to the ones that bank encounter on real life.</p>
  
  <p>If you balance it you will probably have a lot of false positive once you apply your solution to real world's data and, if that may be fine for you to play with, it's not what a bank would like as they can't block too much of the "normal" transaction or the client will change of bank. According to this post (<a href="https://www.quora.com/How-many-transactions-do-typical-banks-process-everyday" rel="nofollow noreferrer">https://www.quora.com/How-many-transactions-do-typical-banks-process-everyday</a>) just the mastercard alone represent 3.4billion transaction/day, just imagine if 1% of the daily transaction where blocked every day, it would represent 34 million of transactions blocked without any valid reason. </p>
  
  <p>It's different from a lot of classification problem where you want to have balanced dataset, here you try to detect anomalies and, by definition, they are rare so they should be as rare in your dataset. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-26T16:32:03.663Z
Answers.LastActivityDate: 2019-12-26T16:32:03.663Z
Answers.UserDisplayName: kirua
Body: <p>I am working on a credit card fraud detection problem using autoencoders. I have a question regarding the dataset I'll be using.</p>
  
  <p>I've downloaded the <a href="https://www.kaggle.com/mlg-ulb/creditcardfraud" rel="nofollow noreferrer">dataset for the above problem from Kaggle</a>, which is highly imbalanced: it contains only 492 frauds out of 284,807 transactions. Why isn't the dataset already balanced? Should I balance it before applying the auto-encoder?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-26T15:40:47.313Z
Comments.Text: I've edited your post to leave only one question because, otherwise, your post should have been closed as too broad. Furthermore, I've added a link to the supposed dataset you are talking about and I've updated the info about this dataset.
Comments.UserDisplayName: nbro
Tags: <neural-networks><datasets><unsupervised-learning><autoencoders>
Title: Why isn't the Credit Card Fraud Detection dataset from Kaggle already balanced?
UserDisplayName: Neha soni
ThreadText: # Why isn't the Credit Card Fraud Detection dataset from Kaggle already balanced?
  
  (Asked by: username_0 on 2018-12-26)
  
  I am working on a credit card fraud detection problem using autoencoders. I have a question regarding the dataset I'll be using.
  
  I've downloaded the [dataset for the above problem from Kaggle](https://www.kaggle.com/mlg-ulb/creditcardfraud), which is highly imbalanced: it contains only 492 frauds out of 284,807 transactions. Why isn't the dataset already balanced? Should I balance it before applying the auto-encoder?
  
  **Tags:** neural-networks, datasets, unsupervised-learning, autoencoders
  > **Comments:**
  > **username_1**: I've edited your post to leave only one question because, otherwise, your post should have been closed as too broad. Furthermore, I've added a link to the supposed dataset you are talking about and I've updated the info about this dataset.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-12-26. Score: 2
  
  I believe that the idea is to have a similar ratio of fraud/"normal transaction" as to the ones that bank encounter on real life.
  
  If you balance it you will probably have a lot of false positive once you apply your solution to real world's data and, if that may be fine for you to play with, it's not what a bank would like as they can't block too much of the "normal" transaction or the client will change of bank. According to this post (<https://www.quora.com/How-many-transactions-do-typical-banks-process-everyday>) just the mastercard alone represent 3.4billion transaction/day, just imagine if 1% of the daily transaction where blocked every day, it would represent 34 million of transactions blocked without any valid reason.
  
  It's different from a lot of classification problem where you want to have balanced dataset, here you try to detect anomalies and, by definition, they are rare so they should be as rare in your dataset.
  
  
  ---
  
  