MLS-C01 · Question #150
A Data Scientist needs to create a model for fraud detection The dataset is composed of 2 years' worth of logged transactions, each with a small set of features All of the transactions in the…
The correct answer is C. Resample the dataset (oversamplinglundersampling), use the F1 score as the objective metric. To achieve optimal predictive power for fraud detection on a highly imbalanced dataset, the data scientist must address the class imbalance through resampling techniques and evaluate model performance using metrics suitable for such datasets.
Question
A Data Scientist needs to create a model for fraud detection The dataset is composed of 2 years' worth of logged transactions, each with a small set of features All of the transactions in the dataset were manually labeled. Since fraud does not occur frequently, the dataset is highly imbalanced Less than 2% of the dataset was labeled as fraudulent. Which solution provides the optimal predictive power for classifying fraudulent activity?
Options
- AOversample the dataset using a clustering technique, use accuracy as the objective metric, and
- BUndersample the majority class in the dataset using a clustering technique, use precision as the
- CResample the dataset (oversamplinglundersampling), use the F1 score as the objective metric,
- DResample the dataset (oversamplinglundersampling), use accuracy as the objective metric, and
How the community answered
(21 responses)- A5% (1)
- B19% (4)
- C67% (14)
- D10% (2)
Why each option
To achieve optimal predictive power for fraud detection on a highly imbalanced dataset, the data scientist must address the class imbalance through resampling techniques and evaluate model performance using metrics suitable for such datasets.
Using accuracy as the objective metric for a highly imbalanced dataset is misleading, as a model can achieve high accuracy by simply predicting the majority class, effectively ignoring the minority fraud class.
While undersampling and precision are relevant, relying solely on precision might lead to a model that misses a significant portion of actual fraudulent activities (low recall), which is generally undesirable in fraud detection.
Resampling the dataset (either oversampling the minority class or undersampling the majority class) directly addresses the class imbalance, and using the F1-score as the objective metric provides a balanced evaluation of precision and recall, which is crucial for accurately classifying rare fraudulent activities without excessive false positives.
Similar to choice A, using accuracy as the objective metric for an imbalanced dataset is inappropriate because it does not adequately reflect the model's ability to correctly identify the minority class.
Concept tested: Handling imbalanced datasets in classification
Source: https://scikit-learn.org/stable/modules/imbalance.html
Topics
Community Discussion
No community discussion yet for this question.