CertNote/ Commute Study Notes
Roadmap
KOEN
CLF-C02 · FoundationalCloud Practitioner - Foundational
DVA-C02 · AssociateDeveloper - Associate
SAA-C03 · AssociateSolutions Architect - Associate
SOA-C02 · AssociateCloudOps Engineer - Associate
SAP-C02 · ProfessionalSolutions Architect - Professional
DOP-C02 · ProfessionalDevOps Engineer - Professional
Linux Master 2 · 2급KAIT Linux Master - Level 2
SCS-C03 · SpecialtySecurity - Specialty
Linux Master 1 · 1급KAIT Linux Master - Level 1
MLA-C01 · AssociateMachine Learning Engineer - Associate
AIF-C01 · FoundationalAI Practitioner - Foundational
DEA-C01 · AssociateData Engineer - Associate
MLS-C01 · SpecialtyMachine Learning - Specialty
  • Week 1
    • 1.The ML Lifecycle (from a Specialty Perspective)
    • 2.Data Storage for ML: S3, EFS, FSx for Lustre, and Data Formats
    • 3.Data Ingestion: Kinesis, Glue, Batch vs. Streaming
    • 4.Data Labeling: SageMaker Ground Truth, Active Learning, Label Quality
    • 5.Week 1 Comprehensive Review: ML Overview & Data Engineering 1
  • Week 2
  • Week 3
  • Week 4
  • Week 5
  • Week 6
    • 1.Algorithm Selection: Mapping by Problem Type
    • 2.SageMaker Builtin 1: XGBoost, Linear Learner, K-Means, KNN
    • 3.SageMaker Builtin 2: Text, Images, Time Series, Recommendations
    • 4.Unsupervised Learning and Anomaly Detection: RCF, PCA, IP Insights, Topic Models (LDA/NTM)
    • 5.Week 6 Comprehensive Review: Algorithm Selection and SageMaker Builtin Algorithms
  • Week 7
  • Week 8
  • Week 9
  • Week 10
  • Week 11
  • Week 12
SQLD · 개발자SQL Developer (SQLD)

© CertNote · 주간랩스

  • About
  • Changelog
  • Contact
  • Terms
  • Privacy
← MLS-C01/Week 6/Day 1

Based on the MLS-C01 exam guide·Report an error

MLS-C01· AssociateWeek 6 · Day 1~34 min read

Day 1 - Algorithm Selection: Mapping by Problem Type

📌 Key Takeaways

  • Week 6 is the starting point of Domain 3 (Modeling). The exam is built so that you narrow down in this order: ML problem type → algorithm family → SageMaker built-in.
  • There are exactly two primary criteria: output form (category / number / group / recommendation / anomaly / topic) and presence of labels (supervised / unsupervised).
  • The secondary filter is data form. If you see the words "text, image, time series, sparse," plain XGBoost drops out of the candidates.
  • On imbalanced data, accuracy is a trap. Switch to precision, recall, F1, and PR-AUC.
  • Even with the same type, data size, sparsity, interpretability, and training cost narrow the final candidate down to one.

Translating a Business Problem into an ML Type

The first decision in modeling is "which algorithm to use," and before it there must always come the translation of the ML problem type. Exam passages almost always give the problem in business language, so converting it into a standard ML type is step 1.

"Identify customers who will churn in advance"      → binary classification (churn yes/no)
"Sort email into spam / normal / promotional"       → multiclass classification
"Predict tomorrow's sales amount"                   → regression
"Automatically discover groups of similar users"    → clustering (unsupervised)
"Recommend products never seen before"              → recommendation / collaborative filtering
"Detect transactions that differ from the usual"    → anomaly detection
"Discover topics in a pile of documents"            → topic modeling (unsupervised)

There are three discriminating signals.

  • Are there labels (answers)? If yes, supervised learning; if no, unsupervised.
  • Is the output a category or a number? Category = classification, continuous number = regression.
  • Is it "discovering groups/patterns" or "predicting"? Discovering = clustering/topics, predicting = classification/regression.

The boundary between supervised, unsupervised, and reinforcement is drawn by "the existence of answer labels." Classification and regression are supervised learning that learns input-output pairs, while clustering, dimensionality reduction, topic modeling, and (mostly) anomaly detection are unsupervised learning that finds structure without labels. Recommendation deals with a user-item interaction matrix and is closer to unsupervised from the collaborative filtering viewpoint, but if you use explicit ratings as the target it can also be viewed as supervised (regression). Reinforcement learning is a separate category that learns a policy from a reward signal (SageMaker RL).

Algorithm Selection Decision Tree

                        [Business problem passage]
                                │
                  ┌─────── Are there labels? ───────┐
                Yes (supervised)                  No (unsupervised)
                  │                                │
      ┌───── Output form? ─────┐          ┌──── What do you want to do? ────┐
   Category    Number    Rank/preference  Find groups  Anomaly  Reduce dim  Find topics
     │           │           │              │          │        │        │
 Classification Regression Recommendation K-Means     RCF /     PCA    LDA / NTM
     │           │           │                      IP Insights
  ┌──┴──┐    ┌───┴───┐   Factorization
Tabular Text Tabular Time series  Machines
  │    │      │       │
XGBoost │  XGBoost  DeepAR
Linear  │  Linear
KNN  BlazingText
  │
Image → Image Classification

Classification

When the output is a discrete category. It splits into binary, multiclass, and multilabel.

SubtypeExampleRepresentative algorithm
Binary classificationChurn or not, fraud or notXGBoost, Linear Learner, KNN
Multiclass classificationProduct category classificationXGBoost, Linear Learner
MultilabelMultiple tags on one imageNeural networks, Image Classification
Text classificationSentiment/topic classificationBlazingText
  • Accuracy alone is often insufficient. For imbalanced data (1% fraud), look at precision, recall, F1, and AUC.
  • The binary/multiclass distinction is specified by predictor_type (Linear Learner) or objective (XGBoost).

Regression

When the output is a continuous number. Predicting sales amount, price, demand quantity, and so on.

  • Candidates: XGBoost (objective=reg:squarederror), Linear Learner (predictor_type=regressor).
  • When the time axis is the core, as in time-series demand forecasting, DeepAR (Day 3) or Amazon Forecast is more suitable than forcing it into regression.
  • Metrics: RMSE, MAE, R². If you are sensitive to outliers, look at MAE as well.

Clustering

Groups data into natural clusters without labels. Customer segmentation, document grouping.

  • Candidate: K-Means (SageMaker built-in). You specify the number of clusters k in advance.
  • Evaluation: since there is no external answer, choose k with internal metrics such as the silhouette coefficient and the elbow (WCSS).

Recommendation

Predicts preferences from user-item interactions.

  • Candidates: Factorization Machines (strong on sparse high-dimensional interactions), neural-network-based recommendation.
  • Cold start and sparsity (most cells are empty) are the key difficulties.

Anomaly Detection

Finds rare events that deviate from normal. It is commonly approached as an unsupervised problem with almost no labels.

  • Candidates: Random Cut Forest (RCF), IP Insights (entity-IP anomalies), and for streaming, Kinesis Data Analytics RCF.
  • The imbalance is so extreme (0.1% anomalies) that it is often hard to solve as classification.

There is a trap: "Can't we solve anomaly detection as classification?" If there are enough anomaly labels and the patterns are stable, supervised classification is also possible, but in reality anomalies are extremely few and keep changing into new forms. In that case, unsupervised anomaly detection (RCF and the like), which learns only normal behavior and measures deviation, is more robust. On the exam, if you see the clue "almost no labels / new forms of anomaly," the RCF family is more likely to be the right answer than classification.

At-a-Glance Mapping Table

Problem typeSupervised / unsupervisedSageMaker built-in candidatesWhen to useWhen not to use
Tabular classification/regressionSupervisedXGBoost, Linear LearnerStructured features, labels availableWhen the data is raw text or images
Distance-based classification/regressionSupervisedKNNWhen "the most similar case" is the answerWhen dimensionality is very high or inference latency matters
ClusteringUnsupervisedK-MeansDiscover segments without labelsWhen answer labels to predict already exist
Recommendation (sparse interactions)Supervised/unsupervisedFactorization MachinesSparse high dimensions blown up by one-hot encodingSmall dense tabular data
Text classification/embeddingSupervised/unsupervisedBlazingTextDocument classification, word vectorsNumeric structured data
Image classificationSupervisedImage ClassificationImage → labelWhen object location is also needed (Object Detection)
Time-series forecastingSupervisedDeepARMany related time series, probabilistic forecastsSimple regression where the time axis is meaningless
Anomaly detectionUnsupervisedRandom Cut Forest, IP InsightsRare events without labelsWhen anomaly labels are plentiful and the patterns are fixed
Dimensionality reductionUnsupervisedPCAHundreds of correlated featuresWhen interpretable original features are essential
Topic modelingUnsupervisedLDA, NTMDiscover topics in documentsWhen category labels already exist (classification)

Metric Interpretation Table: Once the Type Is Set, the Metric Is Set

MetricCalculationWhat a high value meansSituation to prioritizePitfall
Accuracy(TP+TN)/totalRight often overallOnly when classes are balancedOn imbalanced data, "all negative" still gets 99%+
PrecisionTP/(TP+FP)Few false alarmsFalse-alarm cost is high (spam blocking, marketing)Easy to raise by predicting only a few as positive
RecallTP/(TP+FN)Few missesMiss cost is high (fraud, disease)Predicting everything as positive gives 1.0
F1Harmonic mean of precision and recallGood balance of the twoWhen the two costs are similarHides which side is the problem
ROC-AUCArea under the TPR-FPR curveThreshold-independent discriminative powerThreshold undecided, comparing modelsOverly optimistic under extreme imbalance
PR-AUCArea under the precision-recall curveDiscriminative power for the minority classExtreme imbalance (positives under 1%)The value changes when the class ratio changes
RMSESquare root of the mean squared errorFew large errorsRegression, when you want to penalize large errors heavilySensitive to outliers
MAEMean absolute errorSmall average errorRegression, when robustness to outliers is neededTreats large errors leniently

⚠️ Pitfall: If the passage says "fraud is 1% of the total," any answer choice that includes accuracy is wrong. Even guessing everything as normal yields 99%. In this case the answer shifts to recall (we cannot afford to miss) or PR-AUC.

Preprocessing Requirements by Algorithm

Even with the same problem type, preprocessing requirements differ. The exam repeatedly asks "is scaling needed?"

Algorithm familyRepresentative built-inScalingCategorical encodingMissing values
Tree boostingXGBoostNot needed (scale-invariant)Numeric conversion neededCan handle internally
Linear modelLinear LearnerNeeded (normalization option provided)NeededPre-processing needed
Distance-basedKNN, K-MeansMandatoryNeededPre-processing needed
Variance-basedPCANeeded (centering and scaling recommended)NeededPre-processing needed
TextBlazingTextNot applicable (token input)Not applicableNot applicable

Trees split by thresholds within a single feature, so the result is the same as long as only the order of values is preserved (invariance to monotonic transformations). Distance-based and linear models, on the other hand, feed feature values directly into distance and slope calculations, so scale differences distort the result directly. This single line separates every scaling question.

Additional Considerations When Selecting an Algorithm

Selection does not end with the problem type.

Axis to considerQuestion to checkEffect on selection
Data formIs it tabular, text, image, or time series?Constrains the algorithm family most strongly
Data size and sparsityHundreds of millions of rows? Blown up by one-hot encoding?Very large and sparse → Linear Learner/FM; medium-sized structured → XGBoost
InterpretabilityIs an explanation needed for regulation or review?Linear models are favorable (coefficient interpretation)
Training and inference costIs there a GPU and time budget?Deep learning costs more. Avoid an overkill model for a simple problem (KISS)
Online/real-time requirementMust you decide immediately on a stream?Real-time anomaly detection is Kinesis Data Analytics RCF
Cold startAre there new items or short histories?DeepAR, which shares learning across related time series, is favorable

Use the Built-in Directly, or Go with a Managed AI Service?

If the passage says "no ML specialists," "launch quickly," or "we do not want to train and manage models ourselves," the answer is not a built-in algorithm but a higher-level AI service.

SituationSageMaker built-in pathManaged AI service path
Document sentiment and entity extractionTrain directly with BlazingTextAmazon Comprehend
Image labeling and face recognitionTrain Image ClassificationAmazon Rekognition
Time-series demand forecastingTrain and tune DeepARAmazon Forecast
Personalized product recommendationTrain Factorization MachinesAmazon Personalize
Custom features and full control neededBuilt-in or your own containerUnsuitable (limits on customization)

⚠️ Pitfall: There is a trap in the opposite direction too. If the passage says "we need to blend in our domain-specific features and tune it precisely," choosing a managed AI service is wrong. The required level of control separates the two paths.

Question Clue → Answer Mapping Table

The fastest exam tip is to memorize a dictionary of "passage phrase → candidate algorithm."

Passage clueDirection it pointsReason
"The output is a category / yes-or-no"Classification (XGBoost, Linear Learner)Output form determines the type
"Predict an amount or quantity"Regression (XGBoost, Linear Learner)Continuous numeric output
"There are no labels / discover groups"K-MeansUnsupervised signal
"Find topics / a pile of documents"LDA, NTMTopic modeling signal
"Time series / future values / seasonality"DeepAR, Amazon ForecastMay not be ordinary regression
"Text"BlazingTextText-specific, not XGBoost
"Image"Image ClassificationVision-specific, not XGBoost
"Extremely rare / new forms of abnormality"Random Cut ForestFew labels + changing patterns
"The account and IP combination differs from usual"IP InsightsSpecialized for entity-IP
"Too many features / compress"PCADimensionality reduction signal
"User-item / very sparse"Factorization MachinesSparse second-order interactions

If you pick an algorithm name before confirming the output form, you will be wrong. "Customer segmentation" looks like clustering, but if segment labels already exist in the passage, multiclass classification is the answer. The presence of labels flips supervised and unsupervised.

The 5-Step Order for Solving Scenarios

Specialty passages stack several constraints. Reading in the order below narrows most of them to one.

  1. Confirm the output form: Is it category, number, group, recommendation, anomaly, or topic?
  2. Check for labels: If there are none, every supervised-learning option is eliminated.
  3. Check the data form: Is it tabular, text, image, time series, or sparse? Here the built-ins narrow to almost one.
  4. Apply constraints: data size, interpretability, GPU and cost, real-time requirement.
  5. Check preprocessing and metric consistency: See whether scaling requirements and imbalance metrics contradict the options.

In passages where constraints conflict, the answer is not the flashiest technology but the choice that satisfies all the constraints at once. If it violates even one constraint (for example, supervised classification when there are no labels), it is wrong regardless of its other merits.

Starting tomorrow, we dig deeply into each built-in algorithm in this mapping table (XGBoost, Linear Learner, K-Means, KNN), one at a time.

📖 Glossary

  • Supervised learning: Learning a mapping from pairs of inputs and answer labels. Classification and regression belong here.
  • Unsupervised learning: Learning that finds groups, anomalies, and topics from the structure of the data alone, without labels.
  • Multilabel: A problem in which multiple answers are attached to one sample simultaneously. Several tags on one photo.
  • Cold start: A situation, such as a new user, product, or store, where there is almost no history and prediction is difficult.
  • Sparsity: A state in which most cells of a matrix are empty. The user-item rating matrix is the typical case.
  • Elbow (WCSS): A method of choosing k by increasing the number of clusters and finding the point where the decrease in within-cluster sum of squares bends.
  • Silhouette coefficient: A clustering quality metric expressing, from -1 to 1, how well a point fits in its own cluster.
  • PR-AUC: The area under the precision-recall curve. More honest than ROC-AUC on data where positives are extremely rare.
  • Monotonic transformation invariance: The property that the result is the same as long as only the order of the magnitudes is preserved. Tree models have this, so scaling is unnecessary.
  • SageMaker built-in algorithm: A collection of algorithms AWS provides as containers that can be trained with hyperparameters alone, without code.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

A telecom company wants to "identify in advance the customers likely to cancel next month." There are sufficient labels of whether past customers canceled. Which ML type is MOST appropriate for this problem?

Question 2

You want to catch fraud in credit card transactions. Fraud labels are almost nonexistent, and fraud techniques keep changing into new forms. Which approach is MOST suitable?

Question 3

"I want to automatically group thousands of news articles by topic without human labels, and learn the words that make up each topic." Which algorithm family is MOST appropriate?

Question 4

Which of the following is a "regression problem whose output is a continuous number"?

Question 5

As the first criterion for narrowing down the algorithm, which clue should you check first on the exam?

PreviousWeek 5 Comprehensive Review: Statistics and Validation DesignWeek 5 · Day 5Next SageMaker Builtin 1: XGBoost, Linear Learner, K-Means, KNNWeek 6 · Day 2

Official references

  • MLS-C01 official exam page(opens in a new tab)
  • Amazon SageMaker AI documentation(opens in a new tab)

On this page

  • Key Takeaways
  • Translating a Business Problem into an ML Type
  • Algorithm Selection Decision Tree
  • Classification
  • Regression
  • Clustering
  • Recommendation
  • Anomaly Detection
  • At-a-Glance Mapping Table
  • Metric Interpretation Table: Once the Type Is Set, the Metric Is Set
  • Preprocessing Requirements by Algorithm
  • Additional Considerations When Selecting an Algorithm
  • Use the Built-in Directly, or Go with a Managed AI Service?
  • Question Clue → Answer Mapping Table
  • The 5-Step Order for Solving Scenarios
  • Glossary
  • Practice Questions