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 5

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

MLS-C01· AssociateWeek 6 · Day 5~30 min read

Day 5 - Week 6 Comprehensive Review: Algorithm Selection and SageMaker Builtin Algorithms

📌 Key Takeaways

  • The one sentence that runs through Week 6 is "data shape × output shape → builtin." If you memorize this combination mapping, most modeling questions can be solved.
  • The solving procedure always has two steps. ① Determine the ML type from the output shape + whether labels exist → ② Narrow down to a single builtin by the data shape.
  • The words "text, images, time series, sparse" push out plain XGBoost and make a specialized builtin the answer.
  • Answer the scaling question immediately by algorithm family. Distance-based (KNN, K-Means), linear (Linear Learner), and PCA require it; trees (XGBoost) do not.
  • The input format is a clue too. RecordIO-protobuf for sparse and large-scale efficiency, BoW for topic models, JSON Lines for DeepAR.

Flow Map: From Problem to Builtin

This week covered the starting point of MLS-C01 Domain 3 (Modeling) — algorithm selection and SageMaker builtins. Modeling questions on the exam almost always narrow down in the order "identify the problem type → algorithm family → specific builtin." Today we review the four days as a single decision flow and organize the most confusing comparisons.

[Business problem]
   │
   ├─ 1) Identify the ML type from the output shape (Day 1)
   │     Category → classification | Number → regression | Group discovery → clustering
   │     Recommendation → recommendation | Rare events → anomaly detection | Topics → topic model
   │     (Labels present = supervised / absent = unsupervised)
   │
   ├─ 2) Narrow the builtin by data shape (Day 2~4)
   │     Tabular        → XGBoost / Linear Learner / KNN / K-Means
   │     Text           → BlazingText
   │     Image          → Image Classification
   │     Time series    → DeepAR
   │     Sparse recs    → Factorization Machines
   │     Anomalies      → Random Cut Forest / IP Insights
   │     Dimensions     → PCA
   │     Topics         → LDA / NTM
   │
   └─ 3) Finalize the details
         Is scaling needed (distance/linear = needed, trees = not needed)
         Overfitting/underfitting adjustment, input format (RecordIO-protobuf, etc.)

Week 6 Integrated Mapping Table

ProblemBuiltinSupervised/UnsupervisedInput formatScaling
Tabular classification/regression (nonlinear)XGBoostSupervisedCSV, libsvm, Parquet, RecordIO-protobufNot needed
Tabular classification/regression (massive scale, linear)Linear LearnerSupervisedRecordIO-protobuf (recommended), CSVNeeded
Clustering, segmentationK-MeansUnsupervisedRecordIO-protobuf, CSVMandatory
Nearest-case-based predictionKNNSupervisedRecordIO-protobuf, CSVMandatory
Document classificationBlazingText (supervised)SupervisedText, __label__ formatNot applicable
Word embeddingsBlazingText (Word2Vec)UnsupervisedText (whitespace-tokenized)Not applicable
Image classificationImage ClassificationSupervisedRecordIO or images + .lstHandled by container
Time series forecastingDeepARSupervisedJSON Lines (start,target,cat,dynamic_feat)Not applicable
Sparse recommendationFactorization MachinesSupervisedRecordIO-protobuf (float32)Cleanup recommended for numeric features
General numeric anomaly detectionRandom Cut ForestUnsupervisedCSV, RecordIO-protobufRecommended
Entity-IP anomaly detectionIP InsightsUnsupervised(entity, IP) CSVNot applicable
Dimensionality reductionPCAUnsupervisedRecordIO-protobuf, CSVMandatory
Topic discoveryLDA / NTMUnsupervisedBoWNot applicable

💡 Related Theory: There is one principle running through this week — "data shape and output shape decide the algorithm." Even for the same classification, tabular data means XGBoost, text means BlazingText, and images mean Image Classification. Even for the same unsupervised learning, group discovery means K-Means, anomalies mean RCF, dimensionality reduction means PCA, and topics mean LDA/NTM. The exam plants the data shape (table/text/image/time series/sparse) and the goal (prediction/groups/anomalies/topics/compression) in the scenario and narrows to exactly one algorithm through that combination. That is why memorizing the "combination → builtin" mapping is the fastest approach.

"Must-Know" Hyperparameters per Builtin

When a parameter name appears in an option, simply knowing which algorithm it belongs to can decide the answer.

BuiltinParameters you must knowRole
XGBoostobjective, num_round, max_depth, eta, scale_pos_weightObjective function, number of rounds, complexity, learning rate, imbalance
Linear Learnerpredictor_type, num_classes, l1/wd, normalize_dataProblem type, number of classes, regularization, standardization
K-Meansk, init_method, extra_center_factorNumber of clusters, initialization, candidate centers
KNNk, sample_size, dimension_reduction_type, predictor_typeNumber of neighbors, samples, dimensionality reduction, classification/regression
Image Classificationuse_pretrained_model, augmentation_type, num_classesTransfer learning, augmentation, number of classes
DeepARcontext_length, prediction_length, likelihoodPast window, forecast window, output distribution
Factorization Machinesnum_factors, predictor_typeLatent factor dimension, classification/regression
Random Cut Forestnum_trees, num_samples_per_treeNumber of trees, samples per tree
PCAnum_components, algorithm_mode, subtract_meanNumber of components, regular/randomized, centering
IP Insightsnum_entity_vectors, vector_dimEntity hash space, embedding dimension
LDA / NTMnum_topicsNumber of topics to find
                       [Read one sentence of the question]
                                │
              Does it mention "labels"? ──No──┐
                                │Yes          │
                     What is the output?   What do you want to do?
        ┌──────────┬────────────┼──────────┐      ├─ Groups → K-Means
      Category   Number     Ranking/preference │      ├─ Anomalies → RCF / IP Insights
        │           │            │         │      ├─ Compression → PCA
   Data shape?  Time series?  Factorization │      └─ Topics → LDA / NTM
   ├─ Table → XGBoost / ├─ Yes → DeepAR  Machines
   │        Linear /    │
   │        KNN         └─ No → XGBoost / Linear
   ├─ Text → BlazingText (supervised)
   └─ Image → Image Classification
                  (Object Detection if location is needed)

Comparison Table of Confusing Pairs

ComparisonKey differenceDistinguishing clue
XGBoost vs Linear LearnerNonlinear/tabular = XGBoost / massive scale/linear/interpretable = Linear Learner"complex interactions" vs "hundreds of millions of rows, interpret coefficients"
K-Means vs KNNK-Means = unsupervised clustering / KNN = supervised neighbor predictionWhether labels exist
RCF vs IP InsightsAnomalies in general numeric data / anomalies in entity-IP relationshipsWhether the data is a numeric vector or (account, IP) pairs
RCF vs supervised anomaly detectionNo labels needed, handles new types / precise when labels are sufficientIf "almost no labels" appears, RCF
LDA (topic) vs LDA (Linear Discriminant Analysis)SageMaker LDA is a topic model, a name collisionIf the context is documents and topics, it is the topic model
LDA vs NTMProbabilistic/simple/interpretable / neural network/large scale/GPUMention of data scale and GPU
DeepAR vs plain regressionMany related series/probabilistic / single point estimate"thousands of time series," "P90 interval"
BlazingText's two modessupervised = document classification / Word2Vec = word embeddingsWhether labels exist
FM vs collaborative filteringFM is a generalization that includes extra features"context and time features too"
PCA vs K-MeansReduces the axes / groups the rows"compression" vs "groups"
Image Classification vs Object DetectionLabel only / location (bounding box) tooIf "where is it" appears, Detection

💡 Related Theory: Whether scaling is needed can be answered directly from the algorithm family. Distance-based (KNN, K-Means), linear models (Linear Learner), and PCA are distorted by feature scale, so scaling is mandatory. Tree-based (XGBoost), on the other hand, splits each feature independently on a threshold, so it is invariant to scale. The preprocessing and algorithm traps on the exam (for example, "XGBoost must be standardized") are filtered out by this single principle.

Question Clue → Answer Mapping Table (Integrated)

Question phraseAnswerWhy
"There are no labels / discover groups"K-MeansUnsupervised clustering
"No labels / rare, new anomalies"Random Cut ForestUnsupervised anomaly detection
"An account logs in from an unfamiliar IP"IP InsightsSpecialized for entity-IP
"Sparse high-dimensional / user-item"Factorization MachinesSecond-order interactions, RecordIO-protobuf
"Extract topics from documents"LDA / NTMTopic model
"Hundreds of features, reduce the input"PCADimensionality reduction (randomized if huge)
"Thousands of related time series / new product demand"DeepARShared learning across series
"Need P10/P50/P90 probability intervals"DeepARQuantile forecasting
"Images but little labeled data"Image Classification + transfer learning/augmentationUse pretrained weights
"Classify documents very fast on a large corpus"BlazingText supervisedBased on fastText, GPU acceleration
"Tabular + missing values + nonlinear + high accuracy"XGBoostHandles missing values natively, captures nonlinearity
"Hundreds of millions of rows + fast + interpret coefficients"Linear LearnerLarge-scale linear
"Anomalies on a real-time stream"Kinesis Data Analytics RCFSQL function inside the stream
"Launch quickly without ML staff"Comprehend / Rekognition / Forecast / PersonalizeManaged AI services

Metrics and Tuning Direction Summary

SituationMetric choiceReason
Class imbalance (under 1% positives)Recall, PR-AUCAccuracy reaches 99% even with "all negative"
Problem where false positives are costlyPrecisionWrong blocking or sending is expensive
Threshold undecided, comparing modelsROC-AUCDiscriminative power independent of the threshold
Regression, large errors are fatalRMSEPenalizes large errors heavily by squaring
Regression, many outliersMAERobust to outliers
Clustering, topics, dimensionality reductionSilhouette/WCSS / interpretability / explained varianceNo ground-truth labels, so accuracy is not possible
SymptomAdjustment direction (XGBoost)
Overfittingmax_depth↓, eta↓ (+num_round↑), subsample↓, gamma/lambda/alpha↑
Underfittingmax_depth↑, num_round↑, regularization↓
Positives are extremely rarescale_pos_weight↑ (balance_multiclass_weights for Linear Learner)

Self-Check

Recall the answers in your head.

  1. What is the default builtin for nonlinear classification on tabular data? → XGBoost
  2. Probabilistic demand forecasting for thousands of related time series? → DeepAR
  3. What is the recommended input format for sparse user-item recommendation? → RecordIO-protobuf
  4. What preprocessing do both KNN and K-Means require? → Feature scaling
  5. Anomaly detection for an account logging in from an unusual IP? → IP Insights
  6. Discovering topics in a document set, with a preference for large scale and GPU? → NTM
  7. What is SageMaker's "LDA"? → A topic model (Latent Dirichlet Allocation)
  8. What value must be specified in advance in K-Means? → The number of clusters k
  9. What is the textbook combination when image data is scarce? → Transfer learning + data augmentation
  10. What PCA mode is used for very high-dimensional data? → randomized

Wrong-Answer Notes — Five Frequent Traps

TrapWhy it is wrongCorrect judgment
"XGBoost must also be scaled"Trees are scale-invariantScaling is mandatory only for distance, linear, and PCA
"It is distance-based but skip scaling"Large-unit features dominate the distanceKNN and K-Means require scaling
"SageMaker LDA is Linear Discriminant Analysis"Abbreviation collisionThe builtin LDA is a topic model
"Anomaly detection is always supervised classification"Anomaly labels are usually scarceIf labels are scarce or the pattern changes, RCF
"Evaluate imbalanced data by accuracy"It scores high just by getting the majority class rightMove to Recall and PR-AUC
"Feed sparse recommendation data as CSV"It becomes a huge dense table that is mostly zerosFM uses RecordIO-protobuf (float32)
"Images are scarce, so use a deeper model from scratch"Overfits on little dataTransfer learning + augmentation

Comprehensive Exam Tips

  • Step 1: Determine the ML type from the output shape (category/number/group/recommendation/anomaly/topic) and whether labels exist.
  • Step 2: Narrow to a single builtin by the data shape (tabular/text/image/time series/sparse).
  • The words "text/image/time series" push out plain XGBoost and push toward a specialized builtin answer.
  • "No labels + rare/new anomalies" means RCF, and "entity-IP" means IP Insights.
  • For distance/linear/PCA, an option to "skip scaling" is wrong, and "XGBoost must be scaled" is also wrong.
  • Input formats: RecordIO-protobuf for sparse and large-scale efficiency, BoW for topic models, JSON Lines for DeepAR.

Next week (Week 7) moves on to actually training and tuning models — training infrastructure, hyperparameter optimization (Automatic Model Tuning), and regularization and overfitting control.

📖 Glossary

  • Modeling domain (Domain 3): The part of the MLS-C01 exam that covers algorithm selection, training, tuning, and evaluation.
  • Builtin algorithm: An algorithm that AWS provides as a container, which you can train with just hyperparameters and no code.
  • RecordIO-protobuf: A binary input format recommended by many builtins. Efficient for sparse and large-scale data.
  • BoW (Bag-of-Words): A representation that discards word order and counts only frequencies to turn a document into a vector. The input to topic models.
  • JSON Lines: A format that holds one JSON object per line. DeepAR receives one time series per line.
  • Quantile forecast: A way of forecasting the future not as a single value but as probability intervals such as P10/P50/P90.
  • Transfer learning: A technique that starts from pretrained weights and fine-tunes with a small amount of data.
  • Scale invariance: The property that the result stays the same as long as the ordering of the values is preserved. Tree families have it.
  • Latent factor: A low-dimensional hidden feature vector that describes users and items. FM's num_factors sets its dimension.
  • Explained variance ratio: In PCA, the ratio showing how much of the original data's variance the selected principal components preserve.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

Which of the following is the MOST appropriate pairing of "data type and algorithm"?

Question 2

A team building a structured-data classification model with XGBoost claims that "you must standardize to prevent distance distortion." Which evaluation of this claim is correct?

Question 3

You want to detect, in an unsupervised way on general numeric metrics, network traffic anomalies that have almost no labels and keep appearing in new forms. Which built-in algorithm is MOST suitable?

Question 4

Which of the following comparisons has an INCORRECT description?

Question 5

You want to efficiently learn second-order interactions on recommendation data in which user-item interactions are very sparse. Which is the correct pairing of algorithm and recommended input format?

PreviousUnsupervised Learning and Anomaly Detection: RCF, PCA, IP Insights, Topic Models (LDA/NTM)Week 6 · Day 4Next Neural Network Basics: From the Perceptron to BackpropagationWeek 7 · Day 1

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
  • Flow Map: From Problem to Builtin
  • Week 6 Integrated Mapping Table
  • Must-Know" Hyperparameters per Builtin
  • Comparison Table of Confusing Pairs
  • Question Clue → Answer Mapping Table (Integrated)
  • Metrics and Tuning Direction Summary
  • Self-Check
  • Wrong-Answer Notes — Five Frequent Traps
  • Comprehensive Exam Tips
  • Glossary
  • Practice Questions