A company uses Amazon SageMaker to train a model for fraud detection. The dataset has 1 million samples with 200 features. The data is highly imbalanced (0.1% fraud). The team wants to use a random forest model. Which technique should they use to handle the class imbalance during training?
SMOTE generates synthetic samples, effectively balancing the dataset.
Why this answer
SMOTE generates synthetic samples of the minority class, effectively balancing the dataset before training. This is particularly useful for random forest as it learns from the augmented data directly. Option B (class weights) adjusts the loss function but may not work well with random forest's tree-based structure, and it's not a standard technique for this algorithm.
Option C (undersampling) discards majority class data, potentially losing valuable information. Option D (threshold adjustment) is a post-training step and does not address imbalance during the training phase.