1. Learn
  2. /
  3. Courses
  4. /
  5. Fraud Detection in R

Connected

Exercise

SMOTE

When using SMOTE to over-sample the class of fraud cases, you have to decide on the number of nearest neighbors that are taken into account and how many synthetic fraud cases to create. The following exercises will guide you in using SMOTE.

The dataset creditcard and the libraries smotefamily and ggplot2 are already loaded in your workspace. Remember that the dup_size parameter answers the question how many times SMOTE should loop through the existing, real fraud cases.

Instructions 1/4

undefined XP
    1
    2
    3
    4
  • Determine the number of legitimate (n0) and fraud (n1) cases, and set the desired percentage (r0) of legitimate cases to 60%.