SageMaker Algorithm for Fraud Detection

Answer Correct answer: A — Use LightGBM to train the fraud detection model as it handles class imbalance and captures complex feature interdependencies.

Case study An ML engineer is developing a fraud detection model on AWS. The training dataset includes transaction logs, customer profiles, and tables from an on-premises MySQL database. The transaction logs and customer profiles are stored in Amazon S3. The dataset has a class imbalance that affects the learning of the model's algorithm. Additionally, many of the features have interdependencies. The algorithm is not capturing all the desired underlying patterns in the data. The ML engineer needs to use an Amazon SageMaker built-in algorithm to train the model. Which algorithm should the ML engineer use to meet this requirement?

  1. LightGBM Correct Answer
  2. Linear learner
  3. К-means clustering
  4. Neural Topic Model (NTM)

Community Insight

The core concept tested is selecting supervised learning algorithms based on data characteristics like imbalance and non-linear patterns, with the common trap being the selection of linear models that fail to capture feature interactions.

This question identifies the correct Amazon SageMaker built-in algorithm for handling class imbalance and complex feature interdependencies in fraud detection. LightGBM is the optimal choice due to its tree-based structure and native support for these challenges.

Many candidates incorrectly choose Linear Learner because it supports class balancing weights, but it fails to model the complex, non-linear feature interdependencies required for effective fraud detection.

Community Discussion (25 comments)

86a3fbe 👍 1 Selected: A
I think the answer is A. lightGBM is a built-in algorithm of Sagemaker https://docs.aws.amazon.com/en_kr/sagemaker/latest/dg/algos.html and it is very effective modelling when features are interdependent.
eesa 👍 3 Selected: A
1. Clase desbalanceada: LightGBM (Light Gradient Boosted Machine) es muy eficaz para trabajar con datasets desbalanceados, gracias a su capacidad para ajustar los pesos de clases y usar técnicas como el weighted loss o boosting adaptativo. 2. Interdependencia entre variables: LightGBM puede capturar relaciones no lineales e interacciones entre variables gracias a su estructura basada en árboles de decisión. Esto lo hace más adecuado que modelos lineales como el Linear Learner, que solo captura relaciones lineales. 3. No captura de patrones complejos: La descripción indica que el algoritmo actual no está capturando patrones subyacentes complejos, lo que sugiere la necesidad de un modelo más robusto como LightGBM, capaz de modelar relaciones complejas y no lineales en los datos
Sadrik 👍 2 Selected: B
Fraud detection is a binary classification problem, and Linear Learner is designed for classification tasks. Although LightGBM can handle binary classification tasks, including fraud detection and it is actually widely used for fraud detection, it is not available as a built-in SageMaker algorithm. Linear Learner is a built-in SageMaker algorithm.
joy5135 👍 1 Selected: B
because linear learner is a built-in algorithm while lgbm is not
chris_spencer 👍 1 Selected: B
Linear learner is a built-in algorithm whereas LightGBM can be used via custom container.
doull 👍 1 Selected: B
Linear learner is a built-in algorithm where LightBM is not
shabak 👍 3 Selected: A
ChatGPT say it's A: LightGBM
Jacobog3 👍 3 Selected: A
Is supported by Sagemaker
abrarjahin 👍 2 Selected: B
Linear Learner is a built-in algorithm provided by SageMaker for supervised learning tasks like regression and classification. LightGBM is not a built-in algorithm in Amazon SageMaker. While it is a strong gradient-boosting algorithm, it would need to be implemented as a custom script in SageMaker, which increases operational overhead.
ninomfr64 👍 1
LightGBM is built-in https://docs.aws.amazon.com/sagemaker/latest/dg/lightgbm.html
xukun 👍 3 Selected: A
https://docs.aws.amazon.com/en_kr/sagemaker/latest/dg/lightgbm.html
Makendran 👍 1 Selected: B
In an ideal scenario, for a problem with these characteristics (fraud detection, class imbalance, feature interdependencies, complex patterns), a tree-based ensemble method like XGBoost (which is a SageMaker built-in algorithm) would be more suitable. XGBoost can handle non-linear relationships, is robust to class imbalance with proper tuning, and can capture complex patterns in the data. However, given the options provided and the requirement to use a SageMaker built-in algorithm, the Linear learner is the best available choice among these options for this specific fraud detection task.
ninomfr64 👍 2
LightGBM is better for this use case https://docs.aws.amazon.com/sagemaker/latest/dg/lightgbm.html
gulf1324 👍 2 Selected: B
A. Light BGM : It's suitable model, but not built-in model for SageMaker. Answer B. Linear learner : suitable model, built-in model for SageMaker. C. K-means clustering : groups similar data points, not suitable for classification problems, and it's unsupervised learning algorithm so doesn't fit in this case(fraud detection). D. Neural Topic Model: used for topic modeling and document classification, not suitable for fraud detection
minhhnh 👍 1
Light BGM is built-in model for SageMaker https://docs.aws.amazon.com/sagemaker/latest/dg/lightgbm.html
khchan123 👍 5 Selected: A
Here's why LightGBM is the most suitable algorithm for this fraud detection task: Handling Class Imbalance: LightGBM is particularly effective at handling imbalanced datasets, which is a key issue mentioned in the problem statement. It has built-in mechanisms to deal with class imbalance. Feature Interdependencies: LightGBM can capture complex feature interactions through its tree-based structure, addressing the issue of feature interdependencies mentioned in the problem. Capturing Underlying Patterns: As an advanced gradient boosting framework, LightGBM is excellent at capturing complex patterns in data, which the current algorithm is struggling with. Suitable for Fraud Detection: LightGBM is widely used in fraud detection tasks due to its high performance and ability to handle large datasets efficiently. Handling Various Data Types: It can work well with the mix of data types likely present in transaction logs, customer profiles, and database tables.
ninomfr64 👍 4 Selected: A
We have an unbalanced dataset, this means we have labelled dataset thus we are going to use a supervised model training. This reduce options to A and B (K-means and NTM are unsupervised). Both LightGBM and Linear Learner provides hyperparameter to manage unbalanced datasets, respectively "scale-pos_weight" and "positive_example_weight_mult". I would go for LightGBM as this algorithm is more suited to handle complex relationship among features, while Linear Learner learns a linear function, or, for classification problems, a linear threshold function, and maps a vector x to an approximation of the label y.
Ell89 👍 1 Selected: B
Linear Learner. LightGBM is NOT a built in algorithm which the question asks for.
michaelcloud 👍 3 Selected: A
This is a binary classification problem so LightGBM so be used. Other algorithms are not for binary classification.
bakju0 👍 3 Selected: B
Is LightGBM Built-in? Technically, no, LightGBM is not a “built-in algorithm” in the same category as SageMaker’s core algorithms (like Linear Learner or XGBoost). However, it is supported through prebuilt containers, which makes it easy to use in SageMaker.
Saransundar 👍 5 Selected: A
A. LightGBM: Handles class imbalance; captures feature interdependencies; models complex patterns. B. Linear Learner: Limited with interdependent features; struggles with complex patterns; suitable for linear relationships. C. K-means Clustering: Unsupervised algorithm; not suitable for classification; can't handle class imbalance. D. Neural Topic Model (NTM): Designed for topic modeling; unsuitable for fraud detection; doesn't address class imbalance.
Linux_master 👍 5 Selected: A
This is a binary classification problem so LightGBM so be used. Other algorithms are not for binary classification.
GiorgioGss 👍 3 Selected: A
Light Gradient Boosting Machine is effective for handling class imbalances and feature interdependencies.
Leo2023aws 👍 11 Selected: A
https://docs.aws.amazon.com/en_kr/sagemaker/latest/dg/lightgbm.html
aragon_saa 👍 7 Selected: B
Answer is B

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

LightGBM (Light Gradient Boosted Machine) is a gradient boosting framework that uses tree-based learning algorithms. It is specifically designed to handle large-scale data efficiently and is highly effective at capturing complex, non-linear relationships and feature interactions. In the context of fraud detection, which often involves skewed datasets (class imbalance) and intricate transaction patterns, LightGBM provides built-in mechanisms like scale_pos_weight to address imbalance and excels at modeling the underlying patterns that simpler algorithms miss.

Why the Other Options Are Wrong

Linear Learner (Option B) assumes a linear relationship between features and the target variable, making it unsuitable for data with significant interdependencies and non-linear patterns. K-means Clustering (Option C) and Neural Topic Model (Option D) are unsupervised algorithms used for clustering and topic discovery respectively; they cannot be used for supervised classification tasks like fraud detection where labeled training data is available.

Community Comment Notes

Community consensus strongly favors LightGBM, citing its effectiveness with imbalanced data and ability to handle complex feature interactions as noted by user Leo2023aws and others. Users correctly identified that K-means and NTM are unsupervised and thus invalid for this classification task. The discussion highlights that while Linear Learner can balance classes, it lacks the capacity to model the necessary non-linear logic for fraud scenarios.

Official Reference

Exam Strategy

When choosing an ML algorithm, always first determine if the problem is supervised or unsupervised. If supervised, evaluate whether the data has linear or non-linear patterns; use tree-based models like XGBoost or LightGBM for complex, non-linear relationships and feature interactions.

Frequently Asked Questions

Why is Linear Learner not suitable for this fraud detection scenario?

Linear Learner assumes linear relationships between features and the target. It cannot capture the complex, non-linear interdependencies mentioned in the scenario.

Can K-means be used for fraud detection with labeled data?

No, K-means is an unsupervised algorithm used for clustering unlabeled data. Fraud detection with transaction logs and profiles is a supervised classification task.

More MLA-C01 FAQ →

Related Analysis

Practice All MLA-C01 Questions

Access 115 questions with complete answers and detailed explanations.

View Full MLA-C01 Practice Test →

← Back to MLA-C01 Study Guide