Split View: AWS Machine Learning Specialty (MLS-C01) 실전 모의고사 완전 정복
AWS Machine Learning Specialty (MLS-C01) 실전 모의고사 완전 정복
1. MLS-C01 시험 개요
AWS Machine Learning Specialty (MLS-C01)는 AWS 플랫폼에서 ML 솔루션 설계, 구현, 운영 능력을 검증하는 고급 자격증입니다.
| 항목 | 내용 |
|---|---|
| 시험 시간 | 180분 |
| 문제 수 | 65문제 |
| 합격 점수 | 750점 (1000점 만점) |
| 문제 형식 | 객관식, 복수 응답 |
| 시험 비용 | USD 300 |
| 유효 기간 | 3년 |
도메인별 비율
| 도메인 | 비율 |
|---|---|
| Data Engineering | 24% |
| Exploratory Data Analysis | 36% |
| Modeling | 30% |
| ML Implementation and Operations | 10% |
2. AWS ML 핵심 서비스 요약
2.1 SageMaker 주요 기능
| 기능 | 설명 |
|---|---|
| Studio | 통합 ML IDE |
| Data Wrangler | 데이터 전처리 및 피처 엔지니어링 |
| Feature Store | 피처 저장 및 재사용 |
| Training Jobs | 관리형 훈련 |
| Hyperparameter Tuning | 자동 하이퍼파라미터 최적화 |
| Autopilot | AutoML |
| Endpoints | 실시간/배치/비동기 추론 |
| Pipelines | MLOps 워크플로우 |
| Model Monitor | 데이터/모델 드리프트 감지 |
| Clarify | 편향 감지 및 설명 가능성 |
2.2 SageMaker 내장 알고리즘
| 알고리즘 | 사용 사례 |
|---|---|
| XGBoost | 분류, 회귀 (표 형 데이터) |
| Linear Learner | 선형 분류, 회귀 |
| KNN | K-최근접 이웃 |
| DeepAR | 시계열 예측 |
| BlazingText | 텍스트 분류, Word2Vec |
| Object Detection | 객체 탐지 |
| Semantic Segmentation | 픽셀 수준 분류 |
| Seq2Seq | 기계 번역, 텍스트 요약 |
| LDA | 토픽 모델링 |
| PCA | 차원 축소 |
| IP Insights | IP 기반 이상 탐지 |
2.3 Kinesis 서비스 비교
| 서비스 | 용도 | 특징 |
|---|---|---|
| Kinesis Data Streams | 실시간 스트리밍 | 커스텀 소비자, 리텐션 7~365일 |
| Kinesis Data Firehose | ETL 파이프라인 | S3/Redshift/OpenSearch로 자동 전달 |
| Kinesis Data Analytics | 실시간 분석 | SQL/Apache Flink 사용 |
2.4 데이터 서비스
| 서비스 | 용도 |
|---|---|
| S3 | 데이터 레이크 스토리지 |
| Glue | 서버리스 ETL, 메타데이터 카탈로그 |
| Athena | S3에서 SQL 쿼리 |
| Lake Formation | 데이터 레이크 구축 및 보안 |
| Redshift | 데이터 웨어하우스 |
3. 실전 연습 문제 (Q1~Q65)
Data Engineering (Q1~Q16)
Q1. S3에 저장된 대용량 CSV 파일을 Athena로 효율적으로 쿼리하려면 어떻게 데이터를 파티셔닝해야 합니까?
A) 파일 크기별로 파티셔닝 B) 자주 필터링하는 컬럼 (예: 날짜, 지역)을 기준으로 Hive 스타일 파티셔닝 C) 랜덤 파티셔닝 D) 파티셔닝 없이 압축만 적용
정답: B
설명: Athena 성능 최적화를 위해 s3://bucket/data/year=2024/month=03/day=01/ 형식의 Hive 스타일 파티셔닝을 사용합니다. WHERE 절에서 자주 사용하는 컬럼으로 파티셔닝하면 스캔 데이터를 줄여 비용과 쿼리 시간을 절감합니다. Parquet, ORC 같은 컬럼 형식과 함께 사용하면 더욱 효율적입니다.
Q2. AWS Glue ETL 작업을 최적화하여 비용을 줄이려면 어떤 설정을 사용해야 합니까?
A) On-demand Worker Type B) G.1X Worker Type으로 늘리기 C) Job Bookmarks 활성화로 중복 처리 방지 D) 항상 최대 DPU 사용
정답: C
설명: AWS Glue Job Bookmarks를 활성화하면 이전에 처리된 데이터를 추적하여 새로운 데이터만 처리합니다. 이를 통해 중복 처리를 방지하고 비용을 절감합니다. Flex execution(유연한 실행 클래스)도 비용 최적화에 도움이 됩니다.
Q3. Kinesis Data Streams와 Kinesis Data Firehose의 주요 차이점은?
A) 차이 없음, 동일한 서비스 B) Streams는 커스텀 소비자와 재처리 지원, Firehose는 S3/Redshift 등으로 자동 전달 C) Firehose가 더 낮은 지연 시간 D) Streams는 S3에만 저장 가능
정답: B
설명: Kinesis Data Streams는 여러 소비자가 독립적으로 읽을 수 있고, 샤드를 통한 병렬 처리, 리텐션 기간 동안 재처리가 가능합니다. Kinesis Data Firehose는 코드 없이 S3, Redshift, OpenSearch, Splunk 등으로 데이터를 자동 전달하는 완전 관리형 서비스입니다.
Q4. SageMaker Feature Store를 사용하는 주요 이점은?
A) 모델 훈련 속도 향상 B) 피처의 일관성 있는 재사용, 훈련/서빙 스큐 방지, 포인트-인-타임 피처 검색 C) 비용 절감 D) 자동 하이퍼파라미터 튜닝
정답: B
설명: SageMaker Feature Store는 ML 피처를 온라인(저지연 검색) 및 오프라인(대규모 배치 훈련) 저장소로 관리합니다. 여러 팀이 피처를 재사용할 수 있고, 훈련-서빙 스큐를 방지하며, 타임스탬프 기반으로 과거 특정 시점의 피처를 검색할 수 있어 데이터 누출을 방지합니다.
Q5. Lake Formation의 세밀한 접근 제어(fine-grained access control) 기능으로 제어할 수 있는 것은?
A) S3 버킷 정책 B) 데이터베이스, 테이블, 컬럼, 행 수준의 접근 권한 C) EC2 인스턴스 접근 D) IAM 정책만
정답: B
설명: Lake Formation은 Glue Data Catalog의 데이터베이스, 테이블, 컬럼 수준까지 세밀한 접근 제어를 지원합니다. 행 필터(row filter)를 사용하면 특정 사용자가 볼 수 있는 행도 제한할 수 있습니다. IAM 권한보다 더 세밀하게 데이터 접근을 제어합니다.
Q6. 실시간 스트리밍 데이터로부터 집계 통계를 계산하려면 어떤 AWS 서비스 조합이 적합합니까?
A) S3 + Athena B) Kinesis Data Streams + Kinesis Data Analytics (Apache Flink) C) DynamoDB + Lambda D) RDS + EC2
정답: B
설명: Kinesis Data Streams로 실시간 데이터를 수집하고, Kinesis Data Analytics for Apache Flink로 윈도우 기반 집계, 필터링, 변환을 실시간으로 처리합니다. 결과를 다시 Kinesis Streams나 S3로 저장할 수 있습니다.
Q7. S3에 저장된 데이터의 스키마를 자동으로 발견하고 Glue Data Catalog에 등록하는 서비스는?
A) AWS Glue Crawler B) AWS Glue Studio C) AWS Data Pipeline D) AWS Batch
정답: A
설명: AWS Glue Crawler는 S3, RDS, DynamoDB 등의 데이터 소스를 스캔하여 스키마를 자동으로 감지하고 Glue Data Catalog에 테이블 메타데이터를 생성합니다. 일정에 따라 자동 실행하거나 온디맨드로 실행할 수 있습니다.
Q8. 데이터 레이크 아키텍처에서 S3를 사용할 때 다른 AWS 계정과 데이터를 안전하게 공유하는 방법은?
A) S3 버킷을 퍼블릭으로 설정 B) Lake Formation Data Sharing 또는 S3 버킷 정책에 외부 계정 ARN 추가 C) 데이터를 이메일로 전송 D) 크로스 리전 복제만 사용
정답: B
설명: Lake Formation의 RAM(Resource Access Manager)을 통한 데이터 공유나 S3 버킷 정책에 외부 계정의 IAM ARN을 추가하는 방법을 사용합니다. Lake Formation Cross-Account 공유는 컬럼/행 수준 접근 제어를 유지하면서 데이터를 공유할 수 있습니다.
Q9. ML 파이프라인에서 원시 데이터를 피처로 변환하는 단계를 SageMaker 서비스로 자동화하려면?
A) SageMaker Training Jobs만 사용 B) SageMaker Data Wrangler로 변환 정의 후 SageMaker Pipelines로 자동화 C) 수동으로 pandas 스크립트 실행 D) AWS Batch 사용
정답: B
설명: SageMaker Data Wrangler는 GUI 기반으로 300개 이상의 내장 변환을 제공하여 피처 엔지니어링을 정의합니다. 정의된 변환은 SageMaker Processing Jobs로 내보내고, SageMaker Pipelines에 통합하여 전체 ML 워크플로우를 자동화할 수 있습니다.
Q10. Kinesis Data Firehose에서 S3로 저장 전 데이터를 변환하려면?
A) 별도의 EC2 인스턴스 필요 B) Lambda 함수를 Data Transformation으로 연결 C) Glue ETL 작업 직접 호출 D) 변환 불가
정답: B
설명: Kinesis Data Firehose는 Lambda 함수를 데이터 변환 목적으로 연결할 수 있습니다. 각 레코드가 Lambda 함수를 통해 변환(필터링, 형식 변환, 데이터 강화 등)된 후 대상(S3 등)으로 전달됩니다.
Q11. 대규모 ML 데이터셋을 SageMaker 훈련에 효율적으로 로드하는 방법은?
A) 전체 데이터셋을 로컬 EBS에 복사 B) S3 파일 모드 대신 Pipe 모드 또는 FastFile 모드 사용 C) 훈련 전 데이터를 EFS로 이동 D) 압축 해제 후 사용
정답: B
설명: SageMaker 훈련의 데이터 입력 모드: File 모드는 훈련 시작 전 전체 데이터를 복사합니다. Pipe 모드는 S3에서 스트리밍으로 데이터를 로드합니다. FastFile 모드(권장)는 S3를 직접 마운트하여 첫 번째 에포크부터 바로 훈련을 시작할 수 있어 전체 데이터 복사 시간을 절약합니다.
Q12. AWS Glue Studio의 주요 특징은?
A) 머신러닝 모델 훈련 B) 코드 없이 시각적으로 ETL 파이프라인을 설계하고 실행 C) 데이터베이스 관리 D) 실시간 스트리밍 처리만 가능
정답: B
설명: AWS Glue Studio는 드래그 앤 드롭 인터페이스로 ETL 파이프라인을 시각적으로 설계할 수 있습니다. Spark 기반 ETL 작업을 코드 없이 생성하고 모니터링합니다. 생성된 코드(Python/Scala)를 직접 편집할 수도 있습니다.
Q13. 데이터 레이크에서 민감한 개인정보(PII)를 자동으로 탐지하고 마스킹하는 서비스는?
A) Amazon Macie B) AWS Shield C) Amazon GuardDuty D) AWS WAF
정답: A
설명: Amazon Macie는 S3 버킷에서 ML을 사용하여 민감한 데이터(신용카드 번호, SSN, 개인정보 등)를 자동으로 탐지합니다. 탐지된 결과는 Security Hub와 통합되어 관리할 수 있으며, Glue ETL을 통해 마스킹 처리가 가능합니다.
Q14. SageMaker Processing Jobs의 주요 용도는?
A) 모델 서빙 B) 전처리, 후처리, 모델 평가, 피처 엔지니어링 같은 ML 워크플로우 작업 실행 C) 하이퍼파라미터 튜닝 D) A/B 테스트
정답: B
설명: SageMaker Processing Jobs는 완전 관리형으로 데이터 전처리, 피처 엔지니어링, 모델 평가, 배포 후 분석 같은 작업을 실행합니다. 내장 컨테이너(Scikit-learn, Spark, XGBoost) 또는 커스텀 컨테이너를 사용할 수 있습니다.
Q15. 여러 소스에서 오는 스트리밍 데이터를 통합하여 S3 데이터 레이크로 수집하는 아키텍처는?
A) RDS → Lambda → S3 B) 소스 → Kinesis Data Streams → Kinesis Data Firehose → S3 C) EC2 → EBS → S3 D) DynamoDB → S3 직접 복사
정답: B
설명: 다수의 데이터 소스에서 Kinesis Data Streams로 실시간 데이터를 수집하고, Kinesis Data Firehose를 통해 버퍼링, 압축, 암호화를 적용하여 S3에 저장합니다. Firehose는 파티션 키를 기반으로 동적 파티셔닝도 지원합니다.
Q16. Glue Crawler가 스키마를 자동 감지할 때 사용하는 분류자(classifier)를 커스터마이징하는 이유는?
A) 성능 향상 B) 기본 분류자가 인식하지 못하는 커스텀 데이터 형식이나 구분자를 처리하기 위해 C) 비용 절감 D) 보안 강화
정답: B
설명: 기본 Glue 분류자는 CSV, JSON, Parquet, ORC 등 일반적인 형식을 지원합니다. 고정 너비 형식, 커스텀 구분자, 비표준 형식의 데이터가 있을 때 커스텀 분류자(Grok, XML, JSON, CSV)를 작성하여 정확한 스키마 감지를 보장합니다.
Exploratory Data Analysis (Q17~Q40)
Q17. ML 훈련 데이터에서 클래스 불균형(class imbalance) 문제를 해결하는 방법으로 올바르지 않은 것은?
A) SMOTE(합성 소수 클래스 오버샘플링) B) 다수 클래스 언더샘플링 C) 클래스 가중치 조정 D) 데이터를 더 많이 수집하지 않고 무조건 정확도(accuracy)만 사용
정답: D
설명: 클래스 불균형 시 정확도는 오해의 소지가 있는 지표입니다. SMOTE(소수 클래스 합성 샘플 생성), 다수 클래스 언더샘플링, 클래스 가중치 조정, 수집 데이터 확대 등이 올바른 방법입니다. AUC-ROC, F1-score, Precision-Recall 곡선 같은 지표를 사용해야 합니다.
Q18. SageMaker Data Wrangler에서 수치형 변수의 분포를 확인하고 이상치를 탐지하는 방법은?
A) Raw 데이터 다운로드 후 로컬에서 분석 B) Data Wrangler의 Data Quality and Insights Report 활용 C) 수동으로 SQL 쿼리 작성 D) 별도 EC2에서 분석
정답: B
설명: SageMaker Data Wrangler의 Data Quality and Insights Report는 각 컬럼의 통계(평균, 중앙값, 표준편차, 분포), 결측치, 이상치, 클래스 불균형, 데이터 유형 정보를 자동으로 생성합니다. 이를 통해 빠르게 EDA를 수행할 수 있습니다.
Q19. 범주형 변수를 One-Hot Encoding할 때 발생하는 문제와 해결 방법은?
A) 문제 없음 B) 고카디널리티(high cardinality) 변수에서 차원의 저주 발생 - Target Encoding 또는 임베딩 사용 C) 수치형 변수에도 적용 D) 항상 Label Encoding이 더 좋음
정답: B
설명: 카테고리 값이 수백~수천 개인 고카디널리티 변수에 One-Hot Encoding을 적용하면 매우 희소(sparse)한 고차원 벡터가 생성됩니다. 이 경우 Target Encoding(카테고리별 타겟 평균으로 치환), 임베딩, Frequency Encoding 등이 더 효과적입니다.
Q20. SageMaker Clarify를 사용하여 모델의 특정 피처가 예측에 미치는 영향을 설명하는 기법은?
A) Confusion Matrix B) SHAP (SHapley Additive exPlanations) C) ROC Curve D) Learning Curve
정답: B
설명: SageMaker Clarify는 SHAP(Shapley 게임 이론 기반)을 사용하여 각 피처가 예측에 기여하는 정도를 설명합니다. 전역적 설명(전체 데이터셋의 피처 중요도)과 지역적 설명(개별 예측에 대한 피처 기여도)을 모두 제공합니다.
Q21. 훈련 데이터에서 결측값(missing values)을 처리하는 방법으로 적절하지 않은 것은?
A) 평균/중앙값/최빈값 대체 (Imputation) B) KNN 임퓨테이션 C) 해당 행/열 삭제 (비율이 낮을 때) D) 결측값 그대로 모델에 입력
정답: D
설명: 대부분의 ML 알고리즘은 결측값을 처리할 수 없습니다. 적절한 방법: 통계 기반 대체(평균, 중앙값, 최빈값), KNN 임퓨테이션, 예측 기반 임퓨테이션, 또는 결측치 비율이 낮을 때 해당 행/열 삭제입니다. XGBoost는 내부적으로 결측값 처리가 가능합니다.
Q22. 다음 중 데이터의 스케일 차이를 정규화하는 방법으로 올바르지 않은 것은?
A) Min-Max Normalization B) StandardScaler (Z-score 정규화) C) Robust Scaler (중앙값과 IQR 사용) D) 아무 처리도 하지 않음 (트리 기반 모델 제외)
정답: D
설명: 거리 기반 알고리즘(KNN, SVM, 신경망)은 스케일에 민감합니다. Min-Max는 [0,1]로 변환, StandardScaler는 평균 0, 표준편차 1로 변환, RobustScaler는 이상치에 강건합니다. 트리 기반 모델(Random Forest, XGBoost)은 스케일에 비교적 무관합니다.
Q23. 훈련 데이터에서 편향(bias)을 감지하기 위해 SageMaker Clarify가 사용하는 지표는?
A) RMSE B) Class Imbalance (CI), Difference in Positive Proportions (DPL) C) AUC-ROC D) F1-score
정답: B
설명: SageMaker Clarify는 훈련 전 데이터 편향 지표(DPL: 서로 다른 그룹의 레이블 비율 차이, CI: 클래스 불균형 등)와 훈련 후 모델 편향 지표(DPPL: 예측 레이블 비율 차이)를 제공합니다. 인구통계학적 그룹 간의 공정성을 평가합니다.
Q24. 시계열 데이터에서 계절성(seasonality)과 추세(trend)를 제거하는 전처리 방법은?
A) 정규화 (Normalization) B) 차분(Differencing)과 계절성 분해(Seasonal Decomposition) C) PCA 적용 D) 원-핫 인코딩
정답: B
설명: 시계열 데이터의 정상성(stationarity) 확보를 위해 차분(1차, 계절 차분)을 적용합니다. statsmodels의 seasonal_decompose나 STL 분해로 추세, 계절성, 잔차 성분을 분리할 수 있습니다. ARIMA, SARIMA, DeepAR 같은 모델은 이러한 전처리가 중요합니다.
Q25. Feature Engineering에서 날짜/시간 데이터를 ML에 활용하기 위한 방법은?
A) Unix 타임스탬프로만 변환 B) 연도, 월, 일, 요일, 시간, 주차 등 다양한 피처로 분해 C) 날짜 피처 제거 D) 문자열로 그대로 사용
정답: B
설명: 날짜/시간에서 연도, 월, 일, 요일, 시간대, 분기, 주차, 공휴일 여부 등 다양한 피처를 추출합니다. 요일이나 월 같은 순환형(cyclical) 피처는 sin/cos 변환으로 연속성을 표현합니다. 이로써 계절성, 주간 패턴 등을 포착할 수 있습니다.
Q26. 상관관계 분석에서 두 수치형 변수 간 선형 관계를 측정하는 계수는?
A) Spearman 상관계수 B) Pearson 상관계수 C) Kendall 타우 D) Chi-square 통계량
정답: B
설명: Pearson 상관계수는 두 연속형 변수 간의 선형 관계 강도를 -1~1로 측정합니다. Spearman은 순위 기반(비선형 단조 관계), Kendall은 순서 일치도를 측정합니다. 이상치에 강건한 Spearman이 ML 전처리에서 더 일반적으로 사용됩니다.
Q27. SageMaker Data Wrangler에서 피처 중요도를 빠르게 확인하는 방법은?
A) 별도 훈련 필요 B) Quick Model 기능으로 피처 중요도 자동 계산 C) 수동으로 상관관계 분석 D) 불가능
정답: B
설명: Data Wrangler의 Quick Model 기능은 선택된 타겟 변수에 대해 Random Forest 모델을 빠르게 훈련하여 각 피처의 중요도(feature importance)를 시각화합니다. 피처 선택과 데이터 품질 평가에 활용할 수 있습니다.
Q28. 다음 중 분류 모델의 성능 평가에 적합한 지표 조합은?
A) RMSE, MAE, R2 B) Precision, Recall, F1-score, AUC-ROC C) BLEU, Perplexity D) MAPE, SMAPE
정답: B
설명: 분류 모델 평가 지표: Precision(양성 예측 중 실제 양성 비율), Recall(실제 양성 중 예측된 양성 비율), F1-score(Precision과 Recall의 조화 평균), AUC-ROC(임계값 무관 성능 측정). 클래스 불균형 시 F1-score와 AUC-PR(Precision-Recall 곡선 아래 면적)이 중요합니다.
Q29. 고차원 데이터를 시각화할 때 차원 축소에 사용하는 비지도 학습 기법은?
A) Linear Regression B) t-SNE, PCA, UMAP C) Random Forest D) KNN
정답: B
설명: PCA는 분산을 최대화하는 선형 차원 축소입니다. t-SNE는 고차원 데이터의 국소 구조를 보존하여 군집을 시각화합니다. UMAP은 t-SNE보다 빠르고 전역 구조도 보존합니다. SageMaker의 내장 알고리즘으로 PCA가 있습니다.
Q30. 회귀 모델의 성능 평가 지표 중 이상치에 강건한 지표는?
A) RMSE (Root Mean Squared Error) B) MAE (Mean Absolute Error) C) R2 (결정계수) D) MAPE
정답: B
설명: RMSE는 오류를 제곱하므로 이상치에 민감합니다. MAE는 오류의 절댓값 평균으로 이상치 영향이 적습니다. RMSE는 큰 오류에 더 페널티를 주고 싶을 때 사용합니다. R2는 모델이 데이터 분산의 얼마를 설명하는지 나타냅니다.
Q31. 텍스트 데이터를 ML에 사용하기 위한 전처리 단계에 해당하지 않는 것은?
A) 토크나이징(tokenizing) B) 불용어(stopwords) 제거 C) 이미지 증강(image augmentation) D) TF-IDF 벡터화
정답: C
설명: 텍스트 전처리는 토크나이징, 소문자 변환, 불용어 제거, 어간추출(stemming)/표제어추출(lemmatization), TF-IDF나 Word2Vec 같은 벡터화 등을 포함합니다. 이미지 증강은 컴퓨터 비전에서 사용하는 기법입니다.
Q32. 데이터의 다중공선성(multicollinearity)을 탐지하는 방법은?
A) 교차 검증 B) VIF(분산 팽창 계수) 계산 또는 상관관계 히트맵 C) 학습률 조정 D) 배치 크기 변경
정답: B
설명: 다중공선성은 독립 변수 간 강한 상관관계로 발생합니다. VIF(Variance Inflation Factor) 값이 10 이상이면 다중공선성 문제를 의심합니다. 상관관계 히트맵으로 시각적으로 파악할 수도 있습니다. 다중공선성이 있으면 Ridge Regression, PCA 등으로 처리합니다.
Q33. 이상 탐지(anomaly detection)에 적합한 SageMaker 내장 알고리즘은?
A) Linear Learner B) Random Cut Forest (RCF) 및 IP Insights C) BlazingText D) DeepAR
정답: B
설명: SageMaker Random Cut Forest(RCF)는 비지도 이상 탐지 알고리즘입니다. 각 데이터 포인트에 대한 이상 점수(anomaly score)를 계산합니다. IP Insights는 IP 주소 기반 사용 패턴을 학습하여 비정상적인 IP 접근을 탐지합니다.
Q34. 이진 분류에서 임계값(threshold)을 0.5에서 낮추면 어떤 변화가 발생합니까?
A) Precision이 증가하고 Recall이 감소 B) Recall이 증가하고 Precision이 감소 C) AUC-ROC가 증가 D) 변화 없음
정답: B
설명: 임계값을 낮추면 양성으로 예측하는 경우가 늘어나므로 Recall(실제 양성을 더 많이 잡음)이 증가하고 Precision(잘못된 양성 예측도 증가)이 감소합니다. 사기 탐지처럼 False Negative를 최소화해야 할 때 임계값을 낮춥니다. AUC-ROC는 임계값에 무관한 지표입니다.
Q35. 데이터셋에서 과적합(overfitting)이 발생하고 있음을 나타내는 징후는?
A) 훈련 오류와 검증 오류가 모두 높음 B) 훈련 오류는 낮지만 검증 오류가 높음 C) 훈련 오류와 검증 오류가 모두 낮음 D) 검증 오류만 낮음
정답: B
설명: 과적합은 모델이 훈련 데이터에는 잘 맞지만 새로운 데이터(검증/테스트)에는 성능이 낮은 현상입니다. 훈련-검증 오류 격차가 크면 과적합입니다. 해결 방법: 더 많은 훈련 데이터, 정규화(L1/L2), 드롭아웃, 조기 종료, 앙상블 등.
Q36. AWS Glue DataBrew를 사용하는 경우는?
A) 코드 작성이 필요한 복잡한 ETL B) 코드 없이 데이터 클리닝과 변환을 시각적으로 수행 C) 스트리밍 데이터 처리 D) 모델 훈련
정답: B
설명: AWS Glue DataBrew는 코드 없이 250개 이상의 사전 빌드 변환을 사용하여 데이터를 정제하고 표준화하는 시각적 데이터 준비 도구입니다. 비기술적인 사용자가 데이터를 탐색하고 준비하는 데 적합합니다.
Q37. 변수 간 비선형 상호작용을 포착하기 위해 Feature Engineering에서 사용하는 방법은?
A) 스케일링만 적용 B) 다항 피처(polynomial features) 생성 또는 피처 교차 C) 원-핫 인코딩 D) PCA 적용
정답: B
설명: 다항 피처(x1^2, x1*x2 등)나 피처 교차(feature crossing)를 통해 변수 간 비선형 상호작용을 포착합니다. Google의 Wide and Deep Learning처럼 교차 피처를 명시적으로 생성하기도 합니다. 단, 차원이 급격히 증가하므로 주의가 필요합니다.
Q38. K-Fold 교차 검증의 이점은?
A) 훈련 속도 향상 B) 모든 데이터를 훈련과 검증에 활용하여 더 안정적인 성능 추정 C) 데이터 증강 자동화 D) 하이퍼파라미터 자동 설정
정답: B
설명: K-Fold 교차 검증은 데이터를 K개 폴드로 분할하고, K번 반복하면서 각 폴드를 검증 세트로 사용합니다. 모든 데이터가 훈련과 검증에 사용되므로 검증 세트가 작을 때 발생하는 고분산 문제를 줄이고 더 신뢰할 수 있는 성능 추정을 제공합니다.
Q39. 다음 중 불균형 데이터에 적합한 샘플링 전략은?
A) 전체 데이터 사용, 가중치 없음 B) Stratified Sampling으로 클래스 비율 유지 C) 랜덤 샘플링만 사용 D) 소수 클래스 제거
정답: B
설명: Stratified Sampling은 훈련, 검증, 테스트 세트 분할 시 각 세트에 원본 클래스 비율을 유지합니다. sklearn의 train_test_split(stratify=y)으로 구현하며, 불균형 데이터에서 각 세트가 균형 있는 클래스 분포를 가지도록 보장합니다.
Q40. SageMaker Clarify의 훈련 후 편향 감지에서 DPPL(Difference in Positive Proportions in Predicted Labels)이란?
A) 예측 정확도 차이 B) 서로 다른 그룹(facet)에서 모델이 양성 레이블을 예측하는 비율의 차이 C) 모델 파라미터 수의 차이 D) 훈련/검증 오류의 차이
정답: B
설명: DPPL은 보호 속성(예: 성별, 나이)으로 정의된 서로 다른 그룹에서 모델이 양성 결과를 예측하는 비율의 차이를 측정합니다. 값이 0에 가까울수록 공정한 모델입니다. 음의 DPPL은 한 그룹에 불리한 편향을 나타냅니다.
Modeling (Q41~58)
Q41. SageMaker XGBoost를 사용할 때 과적합을 방지하는 하이퍼파라미터는?
A) num_round 증가
B) alpha(L1), lambda(L2) 정규화, subsample, colsample_bytree
C) eta 증가
D) max_depth 무제한
정답: B
설명: XGBoost 정규화: alpha(L1 정규화), lambda(L2 정규화)로 과적합 억제. subsample(행 샘플링 비율), colsample_bytree(열 샘플링 비율)로 다양성 증가. max_depth 제한, min_child_weight 증가, early_stopping_rounds도 과적합 방지에 사용됩니다.
Q42. SageMaker Hyperparameter Tuning Jobs에서 Bayesian 최적화를 사용하는 이점은?
A) 항상 랜덤 서치보다 느림 B) 이전 실험 결과를 기반으로 더 유망한 하이퍼파라미터 조합을 탐색하여 효율적 C) 차이 없음 D) 비용이 더 비쌈
정답: B
설명: Bayesian 최적화는 이전 실험 결과를 사용하여 다음에 탐색할 하이퍼파라미터 조합을 지능적으로 선택합니다. 랜덤 서치나 그리드 서치보다 적은 실험으로 좋은 하이퍼파라미터를 찾을 수 있어 비용과 시간을 절약합니다. SageMaker는 Bayesian, Random, Hyperband 전략을 지원합니다.
Q43. SageMaker Autopilot을 사용할 때의 특징은?
A) 코드 작성이 반드시 필요 B) AutoML 기능으로 데이터에 최적인 알고리즘, 피처 전처리, 하이퍼파라미터를 자동 탐색 C) 딥러닝 모델만 지원 D) 모델 설명 불가
정답: B
설명: SageMaker Autopilot은 완전한 AutoML 서비스입니다. 데이터를 분석하고, 여러 알고리즘(XGBoost, Linear, MLP 등)과 피처 변환을 자동으로 시도하며, 최적의 모델을 선택합니다. 투명성을 위해 생성된 노트북 코드를 제공하며, Explainability Report도 포함됩니다.
Q44. 시계열 예측을 위한 SageMaker 내장 알고리즘은?
A) BlazingText B) DeepAR C) KNN D) PCA
정답: B
설명: SageMaker DeepAR은 자동회귀 순환 신경망(ARNN) 기반으로 시계열 예측에 최적화된 알고리즘입니다. 여러 관련 시계열을 동시에 훈련하여 개별 시계열보다 더 나은 예측을 제공하며, 예측 분포(확률적 예측)도 출력합니다.
Q45. Transfer Learning을 사용하여 이미지 분류 모델을 fine-tuning할 때의 일반적인 접근 방법은?
A) 전체 모델을 랜덤 초기화 후 처음부터 훈련 B) 사전 훈련된 모델의 하위 레이어는 동결(freeze)하고 상위 레이어만 훈련 C) 데이터셋 크기와 무관하게 동일한 전략 적용 D) 전이 학습은 이미지에만 적용 불가
정답: B
설명: Transfer Learning의 일반적인 접근: 1) ImageNet으로 사전 훈련된 VGG, ResNet, EfficientNet 같은 모델 사용, 2) 하위(특징 추출) 레이어는 동결하고, 3) 태스크별 상위 레이어(분류 헤드)만 새 데이터셋으로 fine-tuning합니다. 데이터가 적을수록 더 많은 레이어를 동결합니다.
Q46. SageMaker에서 분산 훈련(Distributed Training)의 두 가지 주요 방식은?
A) 단일 노드, 멀티 코어 B) 데이터 병렬화(Data Parallelism)와 모델 병렬화(Model Parallelism) C) 직렬 훈련, 병렬 훈련 D) GPU 훈련, CPU 훈련
정답: B
설명: 데이터 병렬화: 동일한 모델을 여러 GPU에 복사하고 서로 다른 배치를 처리 후 그래디언트를 동기화합니다. SageMaker Data Parallel Library 사용. 모델 병렬화: 모델 자체를 여러 GPU에 분할합니다. 모델이 단일 GPU에 맞지 않을 때 사용합니다. SageMaker Model Parallel Library 사용.
Q47. SageMaker BlazingText 알고리즘의 주요 사용 사례는?
A) 이미지 분류 B) Word2Vec 임베딩 학습 및 텍스트 분류 (지도/비지도) C) 시계열 예측 D) 추천 시스템
정답: B
설명: SageMaker BlazingText는 두 가지 모드를 지원합니다: 1) Word2Vec 모드: 단어 임베딩을 비지도 학습으로 생성 (Skip-gram, CBOW), 2) Text Classification 모드: 지도 학습으로 텍스트를 분류합니다. fastText와 유사한 구조로 대규모 텍스트를 빠르게 처리합니다.
Q48. 모델 평가에서 BLEU 점수가 사용되는 태스크는?
A) 이진 분류 B) 기계 번역, 텍스트 요약 같은 텍스트 생성 태스크 C) 회귀 D) 시계열 예측
정답: B
설명: BLEU (Bilingual Evaluation Understudy)는 기계 번역 품질을 평가하는 지표입니다. 생성된 텍스트와 참조 번역 간의 n-gram 겹침 비율을 측정합니다. SageMaker Seq2Seq 알고리즘(기계 번역, 텍스트 요약)의 성능 평가에 사용됩니다.
Q49. SageMaker에서 커스텀 훈련 컨테이너(BYOC)를 사용하는 이유는?
A) 비용 절감 B) SageMaker 내장 알고리즘이나 프레임워크가 지원하지 않는 라이브러리나 알고리즘 사용 C) 더 빠른 훈련 D) 자동 분산 훈련
정답: B
설명: BYOC(Bring Your Own Container)는 SageMaker가 지원하지 않는 ML 프레임워크, 커스텀 알고리즘, 특정 버전의 라이브러리가 필요할 때 사용합니다. Docker 이미지를 ECR에 푸시하고 SageMaker에서 사용합니다. SageMaker 훈련/추론 계약을 준수해야 합니다.
Q50. 언어 모델 평가 지표 Perplexity가 낮을수록 의미하는 것은?
A) 모델이 더 불확실 B) 모델이 텍스트를 더 잘 예측 (낮을수록 좋음) C) 모델 크기가 작음 D) 훈련 속도가 빠름
정답: B
설명: Perplexity는 언어 모델이 테스트 데이터를 얼마나 잘 예측하는지 측정합니다. 수학적으로 테스트 데이터의 크로스엔트로피 손실의 지수 함수입니다. Perplexity가 낮을수록 모델이 다음 단어를 더 확실하게 예측하므로 더 좋은 언어 모델입니다.
Q51. SageMaker 훈련에서 Spot 인스턴스를 사용하는 이점과 주의사항은?
A) 항상 더 비쌈 B) 최대 90% 비용 절감 가능하나 인터럽트 발생 가능, 체크포인트 필수 C) 더 빠른 훈련 속도 D) 추가 설정 불필요
정답: B
설명: SageMaker Managed Spot Training을 사용하면 On-Demand 대비 최대 90% 비용을 절감할 수 있습니다. 단, Spot 인스턴스는 언제든 인터럽트될 수 있으므로 체크포인트를 S3에 저장하여 인터럽트 후 재개를 지원해야 합니다. MaxWaitTimeInSeconds로 최대 대기 시간을 설정합니다.
Q52. SageMaker에서 Object Detection 알고리즘의 입력 형식은?
A) CSV 파일 B) RecordIO 또는 증강 매니페스트 형식 (augmented manifest) C) JPEG만 가능 D) TFRecord만 가능
정답: B
설명: SageMaker Object Detection(SSD/Faster RCNN 기반)은 RecordIO-protobuf 형식 또는 증강 매니페스트(S3 이미지 URL + 레이블을 JSON Lines 형식)를 지원합니다. Ground Truth로 생성된 레이블 데이터를 직접 사용할 수 있습니다.
Q53. 훈련 데이터가 매우 적을 때 효과적인 모델 개발 방법은?
A) 복잡한 딥러닝 모델 사용 B) Transfer Learning, Data Augmentation, Few-shot Learning C) 데이터 없이 모델 훈련 D) 정규화 제거
정답: B
설명: 데이터가 적을 때: 1) Transfer Learning - 관련 도메인의 사전 훈련된 모델을 fine-tuning, 2) Data Augmentation - 기존 데이터를 변형하여 데이터셋 확장, 3) Few-shot Learning - 적은 예시로 새로운 클래스 학습, 4) SageMaker JumpStart의 사전 훈련된 모델 활용.
Q54. K-Means 클러스터링의 K값을 결정하는 방법은?
A) 항상 K=3 사용 B) Elbow Method (엘보우 방법) 또는 실루엣 점수 C) 데이터 크기를 K로 사용 D) 랜덤하게 선택
정답: B
설명: Elbow Method: K 값에 따른 WCSS(클러스터 내 제곱합)를 그래프로 그려 기울기가 급격히 완만해지는 '팔꿈치' 지점을 최적 K로 선택합니다. 실루엣 점수: 클러스터 내 응집도와 클러스터 간 분리도를 측정하여 K를 평가합니다. SageMaker K-Means는 여러 K를 자동 시도하는 기능을 제공합니다.
Q55. SageMaker에서 Semantic Segmentation 알고리즘의 출력은?
A) 바운딩 박스 좌표 B) 각 픽셀에 대한 클래스 레이블 C) 이미지 레이블 하나 D) 텍스트 설명
정답: B
설명: Semantic Segmentation은 이미지의 각 픽셀을 특정 클래스(예: 사람, 자동차, 도로)에 할당합니다. 출력은 입력 이미지와 동일한 크기의 마스크이며, 각 픽셀 값이 클래스 ID입니다. 자율 주행, 의료 이미징 분야에서 많이 사용됩니다.
Q56. 앙상블 학습(Ensemble Learning)에서 Boosting과 Bagging의 차이점은?
A) 차이 없음 B) Boosting은 순차적으로 이전 모델의 오류를 보정, Bagging은 독립적 모델의 결과를 평균 C) Bagging이 더 느림 D) Boosting은 회귀에만 사용
정답: B
설명: Bagging(Bootstrap Aggregating): 병렬로 독립적인 모델 훈련, 분산 감소 (Random Forest). Boosting: 순차적으로 이전 모델이 틀린 샘플에 더 집중, 편향 감소 (XGBoost, AdaBoost, LightGBM). 일반적으로 Boosting이 단독 모델보다 성능이 좋지만 과적합 위험이 더 높습니다.
Q57. SageMaker에서 LDA(Latent Dirichlet Allocation) 알고리즘의 주요 사용 사례는?
A) 이진 분류 B) 텍스트 문서의 토픽 모델링 (숨겨진 주제 발견) C) 이미지 분류 D) 수치 예측
정답: B
설명: LDA는 비지도 학습 알고리즘으로 문서 컬렉션에서 잠재적인 주제(토픽)를 발견합니다. 각 문서는 여러 주제의 혼합으로 표현되고, 각 주제는 단어의 분포로 정의됩니다. 뉴스 분류, 콘텐츠 추천 등에 활용됩니다.
Q58. SageMaker에서 훈련 작업 중 로컬 모드(Local Mode)를 사용하는 이점은?
A) 대규모 데이터셋 처리 B) 빠른 코드 개발 및 디버깅 (로컬에서 SageMaker 코드 실행) C) 자동 분산 훈련 D) 프로덕션 배포
정답: B
설명: SageMaker Local Mode는 실제 SageMaker 인스턴스를 시작하지 않고 로컬 환경(또는 SageMaker Studio)에서 훈련/추론 코드를 실행합니다. 빠른 반복 개발과 디버깅에 유용합니다. Docker가 필요하며, 대규모 데이터나 분산 훈련에는 적합하지 않습니다.
ML Implementation and Operations (Q59~Q65)
Q59. SageMaker Endpoint의 실시간 추론과 비동기 추론의 차이점은?
A) 차이 없음 B) 실시간은 즉시 응답 반환, 비동기는 대용량/오래 걸리는 요청을 큐에 쌓고 결과를 S3에 저장 C) 비동기가 더 빠름 D) 실시간만 오토스케일링 지원
정답: B
설명: 실시간 엔드포인트: 즉각적인 응답이 필요한 저지연 요청. 비동기 추론: 요청을 S3에 저장하고 큐에 쌓아 처리하며 결과도 S3에 저장합니다. 대용량 페이로드(최대 1GB), 처리 시간이 긴 요청에 적합합니다. 배치 변환: 대규모 배치 데이터를 일회성으로 처리합니다.
Q60. SageMaker Model Monitor로 감지할 수 있는 문제는?
A) 네트워크 지연시간만 B) 데이터 드리프트, 모델 품질 저하, 편향 드리프트, 피처 속성 변화 C) 비용 초과만 D) 코드 버그만
정답: B
설명: SageMaker Model Monitor의 4가지 모니터 유형: 1) Data Quality Monitor - 입력 데이터의 통계적 변화 감지, 2) Model Quality Monitor - 예측 성능 저하 감지, 3) Bias Drift Monitor - 모델 편향 변화 감지, 4) Feature Attribution Drift Monitor - 피처 중요도 변화 감지.
Q61. SageMaker Pipelines를 사용하는 주요 이유는?
A) 단일 모델 훈련 실행 B) ML 워크플로우(데이터 처리 → 훈련 → 평가 → 배포)를 재현 가능하게 자동화 C) 비용 절감만 D) 데이터 저장
정답: B
설명: SageMaker Pipelines는 ML 워크플로우를 DAG(비순환 방향 그래프)로 정의하고 자동화합니다. 파이프라인 단계(Processing, Training, Evaluation, RegisterModel, Deploy 등)를 연결하고, 조건부 실행, 파라미터 전달, 실험 추적이 가능합니다. CI/CD 통합으로 MLOps를 구현합니다.
Q62. SageMaker 엔드포인트에서 A/B 테스트를 수행하는 방법은?
A) 두 개의 별도 엔드포인트 생성 B) 프로덕션 변형(Production Variants)으로 트래픽 비율을 지정하여 여러 모델 동시 서빙 C) Lambda 함수로 라우팅 D) CloudFront를 통한 분배
정답: B
설명: SageMaker Endpoint의 Production Variants 기능을 사용하여 하나의 엔드포인트에서 여러 모델 버전을 동시에 서빙합니다. 각 변형에 트래픽 가중치를 할당(예: 90% 현재 모델, 10% 새 모델)하고 성능 지표를 비교한 후 트래픽을 점진적으로 이전합니다.
Q63. SageMaker Neo를 사용하는 목적은?
A) 모델 훈련 가속화 B) 특정 하드웨어(엣지 디바이스, 클라우드 인스턴스)에 최적화된 모델 컴파일 C) 데이터 전처리 D) 하이퍼파라미터 튜닝
정답: B
설명: SageMaker Neo는 훈련된 ML 모델을 특정 하드웨어(ARM, x86, NVIDIA GPU, Intel 칩 등)에 최적화하여 컴파일합니다. Apache TVM을 기반으로 모델 크기를 줄이고 추론 속도를 높입니다. IoT/엣지 디바이스 배포에 특히 유용합니다.
Q64. ML 모델 배포 후 성능이 저하되는 주요 원인과 대응 방법은?
A) 서버 오류, 재시작으로 해결 B) 데이터 드리프트(입력 데이터 분포 변화), Model Monitor로 감지 후 재훈련 C) 네트워크 문제 D) 코드 버그
정답: B
설명: 모델 성능 저하의 주요 원인은 데이터 드리프트입니다. 프로덕션 입력 데이터의 분포가 훈련 시와 달라지면 성능이 저하됩니다. SageMaker Model Monitor로 드리프트를 지속적으로 모니터링하고, 드리프트 감지 시 자동으로 알림을 발송하고 재훈련 파이프라인을 트리거합니다.
Q65. SageMaker Serverless Inference의 적합한 사용 사례는?
A) 지속적인 고트래픽 실시간 서비스 B) 간헐적인 트래픽, 사용하지 않을 때 비용 없는 추론 C) 대규모 배치 처리 D) 밀리초 이하 지연시간 요구
정답: B
설명: SageMaker Serverless Inference는 사용할 때만 비용을 지불하며, 유휴 상태에서는 인프라 비용이 없습니다. 간헐적이거나 예측 불가능한 트래픽 패턴에 적합합니다. 콜드 스타트 지연이 있으므로 엄격한 지연시간 요구사항이 있는 경우에는 적합하지 않습니다.
4. 시험 팁
- SageMaker 서비스 심층 이해: 각 SageMaker 구성요소의 목적과 차이점을 명확히 구분
- 내장 알고리즘: 각 알고리즘의 입력 형식, 사용 사례, 핵심 하이퍼파라미터 암기
- Kinesis 서비스 구분: Streams vs Firehose vs Analytics의 차이점 명확히 이해
- 비용 최적화: Spot 인스턴스, 서버리스 추론, Managed Spot Training
- MLOps: SageMaker Pipelines, Model Monitor, Model Registry 흐름 이해
- 데이터 서비스: Glue, Lake Formation, Athena, S3 파티셔닝 전략
- 보안: VPC, IAM 역할, KMS 암호화, SageMaker의 네트워크 격리
AWS Machine Learning Specialty (MLS-C01) Complete Practice Exam
1. MLS-C01 Exam Overview
The AWS Machine Learning Specialty (MLS-C01) is an advanced certification that validates the ability to design, implement, and operate ML solutions on the AWS platform.
| Item | Details |
|---|---|
| Exam Duration | 180 minutes |
| Number of Questions | 65 |
| Passing Score | 750 (out of 1000) |
| Question Format | Multiple choice, multiple response |
| Exam Fee | USD 300 |
| Validity | 3 years |
Domain Weights
| Domain | Weight |
|---|---|
| Data Engineering | 24% |
| Exploratory Data Analysis | 36% |
| Modeling | 30% |
| ML Implementation and Operations | 10% |
2. Key AWS ML Services Summary
2.1 SageMaker Core Features
| Feature | Description |
|---|---|
| Studio | Integrated ML IDE |
| Data Wrangler | Data preparation and feature engineering |
| Feature Store | Feature storage and reuse |
| Training Jobs | Managed model training |
| Hyperparameter Tuning | Automated hyperparameter optimization |
| Autopilot | AutoML |
| Endpoints | Real-time / batch / async / serverless inference |
| Pipelines | MLOps workflows |
| Model Monitor | Data and model drift detection |
| Clarify | Bias detection and explainability |
2.2 SageMaker Built-in Algorithms
| Algorithm | Use Case |
|---|---|
| XGBoost | Classification, regression (tabular data) |
| Linear Learner | Linear classification and regression |
| KNN | K-Nearest Neighbors |
| DeepAR | Time-series forecasting |
| BlazingText | Text classification, Word2Vec |
| Object Detection | Object detection |
| Semantic Segmentation | Pixel-level classification |
| Seq2Seq | Machine translation, summarization |
| LDA | Topic modeling |
| PCA | Dimensionality reduction |
| IP Insights | IP-based anomaly detection |
2.3 Kinesis Service Comparison
| Service | Purpose | Key Features |
|---|---|---|
| Kinesis Data Streams | Real-time streaming | Custom consumers, 7–365 day retention |
| Kinesis Data Firehose | ETL pipeline | Auto-delivery to S3/Redshift/OpenSearch |
| Kinesis Data Analytics | Real-time analytics | SQL / Apache Flink |
2.4 Data Services
| Service | Purpose |
|---|---|
| S3 | Data lake storage |
| Glue | Serverless ETL, metadata catalog |
| Athena | SQL queries on S3 |
| Lake Formation | Data lake setup and security |
| Redshift | Data warehouse |
3. Practice Questions (Q1-Q65)
Data Engineering (Q1-Q16)
Q1. How should data be partitioned so large CSV files in S3 can be queried efficiently with Athena?
A) Partition by file size B) Hive-style partitioning on columns frequently used in filters (e.g., date, region) C) Random partitioning D) Apply compression only, no partitioning
Answer: B
Explanation: For Athena performance, use Hive-style partitioning: s3://bucket/data/year=2024/month=03/day=01/. Partitioning on columns commonly found in WHERE clauses reduces data scanned, cutting cost and query time. Combine with columnar formats like Parquet or ORC for even better performance.
Q2. What configuration should you use to optimize AWS Glue ETL job cost?
A) On-demand Worker Type B) Increase to G.1X Worker Type C) Enable Job Bookmarks to avoid reprocessing D) Always use maximum DPUs
Answer: C
Explanation: Enabling AWS Glue Job Bookmarks tracks previously processed data so only new data is processed on each run. This prevents duplicate processing and reduces cost. Flex execution (flexible execution class) also helps with cost optimization.
Q3. What is the main difference between Kinesis Data Streams and Kinesis Data Firehose?
A) No difference; they are the same service B) Streams supports custom consumers and reprocessing; Firehose delivers automatically to S3/Redshift/etc. C) Firehose has lower latency D) Streams can only store data in S3
Answer: B
Explanation: Kinesis Data Streams allows multiple independent consumers, parallel processing via shards, and reprocessing within the retention window. Kinesis Data Firehose is a fully managed, near-real-time service that delivers data to S3, Redshift, OpenSearch, or Splunk without code.
Q4. What are the key benefits of using SageMaker Feature Store?
A) Faster model training B) Consistent feature reuse, prevention of training-serving skew, and point-in-time feature retrieval C) Cost reduction D) Automatic hyperparameter tuning
Answer: B
Explanation: SageMaker Feature Store manages ML features in an online store (low-latency lookup) and an offline store (large-scale batch training). Multiple teams can reuse features, training-serving skew is prevented, and time-based point-in-time queries avoid data leakage.
Q5. What can Lake Formation fine-grained access control govern?
A) S3 bucket policies B) Access permissions at the database, table, column, and row levels C) EC2 instance access D) IAM policies only
Answer: B
Explanation: Lake Formation supports fine-grained access control down to the Glue Data Catalog database, table, and column level. Row filters further restrict which rows a specific user can see. This is more granular than IAM policies alone.
Q6. Which AWS service combination is suitable for computing aggregated statistics from real-time streaming data?
A) S3 + Athena B) Kinesis Data Streams + Kinesis Data Analytics (Apache Flink) C) DynamoDB + Lambda D) RDS + EC2
Answer: B
Explanation: Kinesis Data Streams ingests real-time data; Kinesis Data Analytics for Apache Flink performs windowed aggregations, filtering, and transformations in real time. Results can be written back to Kinesis Streams or S3.
Q7. Which service automatically discovers schemas in S3 and registers them in the Glue Data Catalog?
A) AWS Glue Crawler B) AWS Glue Studio C) AWS Data Pipeline D) AWS Batch
Answer: A
Explanation: AWS Glue Crawler scans data sources such as S3, RDS, and DynamoDB, automatically infers schemas, and creates table metadata in the Glue Data Catalog. It can run on a schedule or on demand.
Q8. How do you securely share data in an S3-based data lake with another AWS account?
A) Set the S3 bucket to public B) Use Lake Formation Data Sharing or add the external account's ARN to the S3 bucket policy C) Email the data D) Use cross-region replication only
Answer: B
Explanation: Use Lake Formation cross-account sharing via AWS RAM (Resource Access Manager), or add the external account's IAM ARN to the S3 bucket policy. Lake Formation cross-account sharing preserves column/row-level access control while sharing data.
Q9. How do you automate the raw-data-to-features transformation step in an ML pipeline with SageMaker?
A) Use only SageMaker Training Jobs B) Define transformations in SageMaker Data Wrangler, then automate with SageMaker Pipelines C) Run pandas scripts manually D) Use AWS Batch
Answer: B
Explanation: SageMaker Data Wrangler provides a GUI with 300+ built-in transformations for feature engineering. Defined transformations can be exported as SageMaker Processing Jobs and integrated into SageMaker Pipelines to automate the end-to-end ML workflow.
Q10. How can you transform data in Kinesis Data Firehose before it reaches S3?
A) A separate EC2 instance is required B) Connect a Lambda function as a Data Transformation C) Directly invoke a Glue ETL job D) Transformation is not possible
Answer: B
Explanation: Kinesis Data Firehose supports Lambda functions as data transformation targets. Each record passes through the Lambda function (for filtering, format conversion, enrichment, etc.) before being delivered to the destination such as S3.
Q11. What is the most efficient way to load a large ML dataset into SageMaker training?
A) Copy the entire dataset to local EBS first B) Use Pipe mode or FastFile mode instead of File mode C) Move data to EFS before training D) Decompress data before use
Answer: B
Explanation: SageMaker training data input modes: File mode copies all data before training starts. Pipe mode streams data from S3. FastFile mode (recommended) mounts S3 directly, allowing training to start immediately without copying all data first, saving time on large datasets.
Q12. What is the main feature of AWS Glue Studio?
A) Machine learning model training B) Visually design and run ETL pipelines without code C) Database management D) Real-time streaming processing only
Answer: B
Explanation: AWS Glue Studio provides a drag-and-drop interface for visually building ETL pipelines. It generates and monitors Spark-based ETL jobs without code, and allows direct editing of the generated Python or Scala code.
Q13. Which service automatically detects and helps mask sensitive PII data in a data lake?
A) Amazon Macie B) AWS Shield C) Amazon GuardDuty D) AWS WAF
Answer: A
Explanation: Amazon Macie uses ML to automatically detect sensitive data (credit card numbers, SSNs, PII, etc.) in S3 buckets. Findings integrate with Security Hub, and Glue ETL can be used for masking.
Q14. What are SageMaker Processing Jobs primarily used for?
A) Model serving B) Running ML workflow tasks such as preprocessing, postprocessing, model evaluation, and feature engineering C) Hyperparameter tuning D) A/B testing
Answer: B
Explanation: SageMaker Processing Jobs are fully managed and handle data preprocessing, feature engineering, model evaluation, and post-deployment analysis. They support built-in containers (Scikit-learn, Spark, XGBoost) or custom containers.
Q15. What architecture ingests streaming data from multiple sources into an S3 data lake?
A) RDS → Lambda → S3 B) Sources → Kinesis Data Streams → Kinesis Data Firehose → S3 C) EC2 → EBS → S3 D) DynamoDB → S3 direct copy
Answer: B
Explanation: Multiple data sources send real-time data to Kinesis Data Streams. Kinesis Data Firehose applies buffering, compression, and encryption before storing to S3. Firehose also supports dynamic partitioning based on partition keys.
Q16. Why would you customize a classifier in AWS Glue Crawler?
A) Performance improvement B) To handle custom data formats or delimiters that the default classifiers cannot recognize C) Cost reduction D) Security enhancement
Answer: B
Explanation: Default Glue classifiers support common formats like CSV, JSON, Parquet, and ORC. Custom classifiers (Grok, XML, JSON, CSV) are needed for fixed-width formats, non-standard delimiters, or non-standard data formats to ensure accurate schema detection.
Exploratory Data Analysis (Q17-Q40)
Q17. Which is NOT a correct way to handle class imbalance in ML training data?
A) SMOTE (Synthetic Minority Over-sampling Technique) B) Undersampling the majority class C) Adjusting class weights D) Collecting no additional data and using accuracy only
Answer: D
Explanation: Accuracy is misleading with class imbalance. Correct approaches: SMOTE (generate synthetic minority samples), undersampling the majority class, adjusting class weights, and collecting more data. Use metrics like AUC-ROC, F1-score, and Precision-Recall curves instead.
Q18. How do you check the distribution of numeric variables and detect outliers in SageMaker Data Wrangler?
A) Download raw data and analyze locally B) Use Data Wrangler's Data Quality and Insights Report C) Manually write SQL queries D) Analyze on a separate EC2 instance
Answer: B
Explanation: SageMaker Data Wrangler's Data Quality and Insights Report automatically generates per-column statistics (mean, median, std, distribution), missing values, outliers, class imbalance, and data type information — enabling fast EDA.
Q19. What problem arises when One-Hot Encoding a high-cardinality categorical variable, and how is it solved?
A) No problem B) Curse of dimensionality from high-cardinality variables — use Target Encoding or embeddings C) Apply it to numeric variables too D) Label Encoding is always better
Answer: B
Explanation: Applying One-Hot Encoding to variables with hundreds or thousands of categories produces very sparse, high-dimensional vectors. Target Encoding (replacing categories with the target mean), embeddings, or Frequency Encoding are more effective alternatives.
Q20. Which technique does SageMaker Clarify use to explain the influence of specific features on predictions?
A) Confusion Matrix B) SHAP (SHapley Additive exPlanations) C) ROC Curve D) Learning Curve
Answer: B
Explanation: SageMaker Clarify uses SHAP (based on Shapley game theory) to explain each feature's contribution to predictions. It provides both global explanations (feature importance over the entire dataset) and local explanations (per-prediction feature contributions).
Q21. Which is NOT a proper way to handle missing values in training data?
A) Mean/median/mode imputation B) KNN imputation C) Drop rows/columns (when the proportion is small) D) Feed missing values directly into the model
Answer: D
Explanation: Most ML algorithms cannot handle missing values. Correct approaches: statistical imputation (mean, median, mode), KNN imputation, prediction-based imputation, or dropping rows/columns when the proportion is small. XGBoost handles missing values internally.
Q22. Which is NOT a valid normalization technique for scaling differences between features?
A) Min-Max Normalization B) StandardScaler (Z-score normalization) C) Robust Scaler (uses median and IQR) D) No scaling at all (except for tree-based models)
Answer: D
Explanation: Distance-based algorithms (KNN, SVM, neural networks) are sensitive to scale. Min-Max maps to [0,1]; StandardScaler produces mean=0, std=1; RobustScaler is robust to outliers. Tree-based models (Random Forest, XGBoost) are relatively scale-invariant, but other algorithms require scaling.
Q23. Which metrics does SageMaker Clarify use to detect bias in training data?
A) RMSE B) Class Imbalance (CI), Difference in Positive Proportions in Labels (DPL) C) AUC-ROC D) F1-score
Answer: B
Explanation: SageMaker Clarify provides pre-training bias metrics (DPL: difference in label proportion across groups; CI: class imbalance, etc.) and post-training model bias metrics (DPPL: difference in predicted positive proportions). These evaluate fairness across demographic groups.
Q24. Which preprocessing technique removes seasonality and trend from time-series data?
A) Normalization B) Differencing and seasonal decomposition C) Applying PCA D) One-hot encoding
Answer: B
Explanation: To achieve stationarity in time-series data, apply differencing (first-order, seasonal). Use statsmodels' seasonal_decompose or STL decomposition to separate trend, seasonal, and residual components. This preprocessing is critical for ARIMA, SARIMA, and DeepAR.
Q25. How should date/time data be prepared for use in ML?
A) Convert only to Unix timestamp B) Decompose into year, month, day, day-of-week, hour, week number, and other features C) Remove date features D) Use the raw string directly
Answer: B
Explanation: Extract year, month, day, day-of-week, time-of-day, quarter, week number, and whether it's a holiday from date/time fields. Cyclical features like day-of-week or month should be sin/cos-encoded to preserve continuity. This captures seasonality and weekly patterns.
Q26. Which correlation coefficient measures the linear relationship between two numeric variables?
A) Spearman correlation B) Pearson correlation C) Kendall's tau D) Chi-square statistic
Answer: B
Explanation: Pearson correlation measures the strength of the linear relationship between two continuous variables on a scale of -1 to 1. Spearman is rank-based (monotonic non-linear), Kendall measures rank concordance. Spearman is more commonly used in ML preprocessing due to its robustness to outliers.
Q27. How do you quickly check feature importance in SageMaker Data Wrangler?
A) Separate training required B) Use the Quick Model feature to automatically compute feature importance C) Manual correlation analysis D) Not possible
Answer: B
Explanation: Data Wrangler's Quick Model feature quickly trains a Random Forest on the selected target variable and visualizes each feature's importance. This is useful for feature selection and data quality assessment.
Q28. Which combination of metrics is appropriate for evaluating a classification model?
A) RMSE, MAE, R2 B) Precision, Recall, F1-score, AUC-ROC C) BLEU, Perplexity D) MAPE, SMAPE
Answer: B
Explanation: Classification metrics: Precision (true positives among predicted positives), Recall (true positives found among all actual positives), F1-score (harmonic mean of Precision and Recall), AUC-ROC (threshold-independent performance measure). For imbalanced data, F1-score and AUC-PR (area under the Precision-Recall curve) are especially important.
Q29. Which unsupervised dimensionality reduction technique is used to visualize high-dimensional data?
A) Linear Regression B) t-SNE, PCA, UMAP C) Random Forest D) KNN
Answer: B
Explanation: PCA is a linear dimensionality reduction that maximizes variance. t-SNE preserves local structure in high-dimensional data for cluster visualization. UMAP is faster than t-SNE and also preserves global structure. SageMaker includes PCA as a built-in algorithm.
Q30. Which regression evaluation metric is most robust to outliers?
A) RMSE (Root Mean Squared Error) B) MAE (Mean Absolute Error) C) R2 (coefficient of determination) D) MAPE
Answer: B
Explanation: RMSE squares errors, making it sensitive to outliers. MAE takes the mean of absolute errors, reducing outlier influence. Use RMSE when large errors deserve extra penalty. R2 measures how much data variance the model explains.
Q31. Which step is NOT part of text data preprocessing for ML?
A) Tokenizing B) Removing stopwords C) Image augmentation D) TF-IDF vectorization
Answer: C
Explanation: Text preprocessing includes tokenizing, lowercasing, removing stopwords, stemming/lemmatization, and vectorization (TF-IDF, Word2Vec, etc.). Image augmentation is a computer vision technique, not a text preprocessing step.
Q32. How do you detect multicollinearity in a dataset?
A) Cross-validation B) Calculate VIF (Variance Inflation Factor) or use a correlation heatmap C) Adjust the learning rate D) Change batch size
Answer: B
Explanation: Multicollinearity arises from strong correlations between independent variables. A VIF greater than 10 indicates multicollinearity. A correlation heatmap provides a visual assessment. Solutions include Ridge Regression or PCA to address the issue.
Q33. Which SageMaker built-in algorithm is suited for anomaly detection?
A) Linear Learner B) Random Cut Forest (RCF) and IP Insights C) BlazingText D) DeepAR
Answer: B
Explanation: SageMaker Random Cut Forest (RCF) is an unsupervised anomaly detection algorithm that computes an anomaly score for each data point. IP Insights learns normal usage patterns for IP addresses and detects unusual access.
Q34. What happens when the classification threshold is lowered from 0.5?
A) Precision increases and Recall decreases B) Recall increases and Precision decreases C) AUC-ROC increases D) No change
Answer: B
Explanation: Lowering the threshold predicts more positives, increasing Recall (catching more true positives) but decreasing Precision (more false positives). Use a lower threshold when minimizing false negatives is critical (e.g., fraud detection). AUC-ROC is a threshold-independent metric.
Q35. What indicates overfitting in a model?
A) Both training and validation errors are high B) Training error is low but validation error is high C) Both training and validation errors are low D) Only validation error is low
Answer: B
Explanation: Overfitting occurs when a model fits the training data well but generalizes poorly to new data (validation/test). A large gap between training and validation errors signals overfitting. Solutions: more training data, regularization (L1/L2), dropout, early stopping, ensemble methods.
Q36. When is AWS Glue DataBrew the right choice?
A) Complex ETL requiring custom code B) Visual data cleaning and transformation without code C) Real-time streaming data processing D) Model training
Answer: B
Explanation: AWS Glue DataBrew is a visual data preparation tool with 250+ pre-built transformations for cleaning and standardizing data without code. It is ideal for non-technical users to explore and prepare data.
Q37. Which feature engineering technique captures non-linear interactions between variables?
A) Applying scaling only B) Creating polynomial features or feature crosses C) One-hot encoding D) Applying PCA
Answer: B
Explanation: Polynomial features (x1^2, x1*x2, etc.) and feature crosses capture non-linear interactions between variables. Google's Wide and Deep Learning explicitly creates cross features. However, dimensionality grows rapidly, so care is needed.
Q38. What is the benefit of K-Fold cross-validation?
A) Faster training B) Uses all data for both training and validation, providing a more stable performance estimate C) Automated data augmentation D) Automatic hyperparameter tuning
Answer: B
Explanation: K-Fold cross-validation splits data into K folds and iterates K times, using each fold as the validation set once. All data participates in both training and validation, reducing high-variance estimation caused by a small validation set and providing a more reliable performance estimate.
Q39. Which sampling strategy is appropriate for imbalanced data?
A) Use all data with no weighting B) Stratified sampling to maintain class proportions C) Random sampling only D) Remove the minority class
Answer: B
Explanation: Stratified sampling preserves the original class proportions in each train/validation/test split. In sklearn use train_test_split(stratify=y). This ensures each set has a balanced class distribution, which is crucial for evaluating model performance on imbalanced data.
Q40. In SageMaker Clarify's post-training bias detection, what does DPPL (Difference in Positive Proportions in Predicted Labels) measure?
A) Difference in prediction accuracy B) Difference in the rate at which the model predicts positive labels across groups defined by a protected attribute C) Difference in number of model parameters D) Difference between training and validation errors
Answer: B
Explanation: DPPL measures the difference in the proportion of positive predictions across groups defined by a protected attribute (e.g., gender, age). A value close to 0 indicates a fairer model. A negative DPPL indicates bias against one group.
Modeling (Q41-Q58)
Q41. Which SageMaker XGBoost hyperparameters help prevent overfitting?
A) Increase num_round
B) alpha (L1), lambda (L2) regularization, subsample, colsample_bytree
C) Increase eta
D) Unlimited max_depth
Answer: B
Explanation: XGBoost regularization: alpha (L1 regularization) and lambda (L2 regularization) penalize model complexity. subsample (row sampling ratio) and colsample_bytree (column sampling ratio) increase diversity. Limiting max_depth, increasing min_child_weight, and using early_stopping_rounds also prevent overfitting.
Q42. What is the benefit of Bayesian optimization in SageMaker Hyperparameter Tuning Jobs?
A) Always slower than random search B) Efficiently explores promising hyperparameter combinations based on previous experiment results C) No difference D) More expensive
Answer: B
Explanation: Bayesian optimization intelligently selects the next hyperparameter combination to try based on prior experiment results. It finds good hyperparameters with fewer experiments than random or grid search, saving time and cost. SageMaker supports Bayesian, Random, and Hyperband strategies.
Q43. What characterizes SageMaker Autopilot?
A) Code is always required B) AutoML that automatically explores algorithms, feature preprocessing, and hyperparameters C) Supports only deep learning models D) Model explainability is not available
Answer: B
Explanation: SageMaker Autopilot is a fully managed AutoML service. It analyzes data, tries multiple algorithms (XGBoost, Linear, MLP, etc.) and feature transformations, and selects the best model. It provides generated notebook code for transparency and includes an Explainability Report.
Q44. Which SageMaker built-in algorithm is designed for time-series forecasting?
A) BlazingText B) DeepAR C) KNN D) PCA
Answer: B
Explanation: SageMaker DeepAR is an autoregressive recurrent neural network (ARNN) optimized for time-series forecasting. Training jointly on multiple related time series produces better forecasts than individual series. It also outputs probabilistic predictions (forecast distributions).
Q45. What is the general approach when fine-tuning a pre-trained image classification model with Transfer Learning?
A) Randomly initialize the entire model and train from scratch B) Freeze lower layers and train only the upper layers on the new dataset C) Apply the same strategy regardless of dataset size D) Transfer learning cannot be applied to images
Answer: B
Explanation: Common Transfer Learning approach: 1) Use a model pre-trained on ImageNet (VGG, ResNet, EfficientNet, etc.), 2) Freeze the lower feature-extraction layers, 3) Fine-tune only the upper task-specific layers (classification head) on the new dataset. Freeze more layers when data is scarce.
Q46. What are the two main approaches to distributed training in SageMaker?
A) Single-node, multi-core B) Data Parallelism and Model Parallelism C) Serial training, parallel training D) GPU training, CPU training
Answer: B
Explanation: Data Parallelism: copies the same model to multiple GPUs, each processes a different batch, then gradients are synchronized. Uses SageMaker Data Parallel Library. Model Parallelism: splits the model itself across multiple GPUs — used when a model doesn't fit on a single GPU. Uses SageMaker Model Parallel Library.
Q47. What are the main use cases for SageMaker BlazingText?
A) Image classification B) Word2Vec embedding training and text classification (supervised/unsupervised) C) Time-series forecasting D) Recommendation systems
Answer: B
Explanation: SageMaker BlazingText supports two modes: 1) Word2Vec mode: generates word embeddings via unsupervised learning (Skip-gram, CBOW), and 2) Text Classification mode: supervised classification of text. Similar to fastText, it processes large text datasets quickly.
Q48. For which task is the BLEU score used as an evaluation metric?
A) Binary classification B) Text generation tasks like machine translation and text summarization C) Regression D) Time-series forecasting
Answer: B
Explanation: BLEU (Bilingual Evaluation Understudy) evaluates machine translation quality by measuring n-gram overlap between generated text and reference translations. It is used to evaluate the SageMaker Seq2Seq algorithm (machine translation, text summarization).
Q49. Why would you use a custom training container (BYOC) in SageMaker?
A) To reduce cost B) To use libraries or algorithms not supported by SageMaker's built-in algorithms or frameworks C) For faster training D) For automatic distributed training
Answer: B
Explanation: BYOC (Bring Your Own Container) is used when you need an ML framework, custom algorithm, or specific library version not supported by SageMaker. Push a Docker image to ECR and use it in SageMaker. The image must conform to the SageMaker training/inference contract.
Q50. What does a lower Perplexity value mean for a language model?
A) The model is more uncertain B) The model predicts text better (lower is better) C) The model is smaller D) Training is faster
Answer: B
Explanation: Perplexity measures how well a language model predicts test data. Mathematically it is the exponent of the cross-entropy loss on test data. Lower perplexity means the model predicts the next word with more confidence — indicating a better language model.
Q51. What are the benefits and caveats of using Spot instances for SageMaker training?
A) Always more expensive B) Up to 90% cost savings but interruptions possible; checkpointing to S3 is required C) Faster training speed D) No additional configuration needed
Answer: B
Explanation: SageMaker Managed Spot Training can save up to 90% compared to On-Demand. However, Spot instances can be interrupted at any time, so checkpoints must be saved to S3 to support resumption after interruption. Set MaxWaitTimeInSeconds to control maximum wait time.
Q52. What is the input format for the SageMaker Object Detection algorithm?
A) CSV files B) RecordIO or augmented manifest format C) JPEG only D) TFRecord only
Answer: B
Explanation: SageMaker Object Detection (SSD/Faster RCNN-based) supports RecordIO-protobuf format and augmented manifest (JSON Lines with S3 image URLs + labels). Labels generated by SageMaker Ground Truth can be used directly.
Q53. Which approach is effective when training data is very limited?
A) Use complex deep learning models B) Transfer Learning, Data Augmentation, Few-shot Learning C) Train a model without data D) Remove regularization
Answer: B
Explanation: With limited data: 1) Transfer Learning — fine-tune a pre-trained model from a related domain, 2) Data Augmentation — expand the dataset by transforming existing data, 3) Few-shot Learning — learn new classes from a few examples, 4) Use pre-trained models from SageMaker JumpStart.
Q54. How do you determine the optimal K value for K-Means clustering?
A) Always use K=3 B) Elbow Method or Silhouette Score C) Use the dataset size as K D) Choose randomly
Answer: B
Explanation: Elbow Method: plot WCSS (within-cluster sum of squares) against K and pick the "elbow" point where the curve flattens. Silhouette Score: measures intra-cluster cohesion and inter-cluster separation to evaluate K. SageMaker K-Means can automatically try multiple K values.
Q55. What is the output of SageMaker's Semantic Segmentation algorithm?
A) Bounding box coordinates B) A class label for each pixel C) A single image label D) A text description
Answer: B
Explanation: Semantic Segmentation assigns each pixel of an image to a specific class (e.g., person, car, road). The output is a mask the same size as the input image, where each pixel value is a class ID. Widely used in autonomous driving and medical imaging.
Q56. What is the difference between Boosting and Bagging in ensemble learning?
A) No difference B) Boosting sequentially corrects prior model errors; Bagging averages results of independent models C) Bagging is slower D) Boosting is only for regression
Answer: B
Explanation: Bagging (Bootstrap Aggregating): trains independent models in parallel and averages results; reduces variance (Random Forest). Boosting: trains models sequentially, focusing more on samples misclassified by the prior model; reduces bias (XGBoost, AdaBoost, LightGBM). Boosting generally outperforms single models but has a higher overfitting risk.
Q57. What is the primary use case for SageMaker's LDA (Latent Dirichlet Allocation) algorithm?
A) Binary classification B) Topic modeling to discover hidden themes in text documents C) Image classification D) Numeric prediction
Answer: B
Explanation: LDA is an unsupervised algorithm that discovers latent topics in a document collection. Each document is represented as a mixture of topics, and each topic is a distribution over words. Applications include news categorization and content recommendation.
Q58. What is the benefit of using SageMaker Local Mode during training job development?
A) Handles large-scale datasets B) Fast code development and debugging (run SageMaker code locally) C) Automatic distributed training D) Production deployment
Answer: B
Explanation: SageMaker Local Mode runs training/inference code locally (or in SageMaker Studio) without starting actual SageMaker instances. Useful for fast iterative development and debugging. Requires Docker. Not appropriate for large-scale data or distributed training.
ML Implementation and Operations (Q59-Q65)
Q59. What is the difference between SageMaker real-time inference and async inference?
A) No difference B) Real-time returns responses immediately; async queues large/slow requests and stores results in S3 C) Async is faster D) Only real-time supports auto-scaling
Answer: B
Explanation: Real-time endpoints: low-latency requests requiring immediate responses. Async inference: queues requests stored in S3 and stores results in S3 — suitable for large payloads (up to 1 GB) or long-running processing. Batch Transform: processes large batches in a one-off job.
Q60. What issues can SageMaker Model Monitor detect?
A) Network latency only B) Data drift, model quality degradation, bias drift, and feature attribution changes C) Cost overruns only D) Code bugs only
Answer: B
Explanation: SageMaker Model Monitor has four monitor types: 1) Data Quality Monitor — detects statistical changes in input data, 2) Model Quality Monitor — detects degradation in prediction performance, 3) Bias Drift Monitor — detects changes in model bias, 4) Feature Attribution Drift Monitor — detects changes in feature importance.
Q61. Why is SageMaker Pipelines used?
A) To run a single model training job B) To automate and reproduce ML workflows (data processing → training → evaluation → deployment) C) Cost reduction only D) Data storage
Answer: B
Explanation: SageMaker Pipelines defines ML workflows as a DAG (Directed Acyclic Graph) and automates them. Pipeline steps (Processing, Training, Evaluation, RegisterModel, Deploy, etc.) can be chained with conditional execution, parameter passing, and experiment tracking. CI/CD integration enables MLOps.
Q62. How do you perform A/B testing on a SageMaker endpoint?
A) Create two separate endpoints B) Use Production Variants to specify traffic weights and serve multiple models simultaneously C) Route with a Lambda function D) Distribute via CloudFront
Answer: B
Explanation: SageMaker Endpoint Production Variants allows serving multiple model versions from a single endpoint. Assign traffic weights to each variant (e.g., 90% current model, 10% new model), compare performance metrics, then gradually shift traffic.
Q63. What is the purpose of SageMaker Neo?
A) Accelerate model training B) Compile and optimize models for specific hardware (edge devices, cloud instances) C) Data preprocessing D) Hyperparameter tuning
Answer: B
Explanation: SageMaker Neo compiles trained ML models for specific hardware targets (ARM, x86, NVIDIA GPU, Intel chips, etc.) using Apache TVM to reduce model size and increase inference speed. Particularly useful for IoT/edge device deployments.
Q64. What is the main cause of model performance degradation after deployment, and how should it be addressed?
A) Server errors; resolve by restarting B) Data drift (change in input data distribution); detect with Model Monitor, then retrain C) Network issues D) Code bugs
Answer: B
Explanation: The main cause of model degradation is data drift — when the distribution of production input data diverges from training data. SageMaker Model Monitor continuously monitors for drift, sends automatic alerts when drift is detected, and can trigger a retraining pipeline.
Q65. What is the ideal use case for SageMaker Serverless Inference?
A) Continuously high-traffic real-time services B) Intermittent traffic; no infrastructure cost when idle C) Large-scale batch processing D) Sub-millisecond latency requirements
Answer: B
Explanation: SageMaker Serverless Inference charges only for actual usage with zero infrastructure cost when idle. It is well-suited for intermittent or unpredictable traffic patterns. There is a cold-start latency, so it is not appropriate for strict latency requirements.
4. Exam Tips
- Deep Understanding of SageMaker Services: Clearly distinguish the purpose and differences of each SageMaker component.
- Built-in Algorithms: Memorize the input formats, use cases, and key hyperparameters for each algorithm.
- Kinesis Service Differences: Clearly understand Streams vs Firehose vs Analytics.
- Cost Optimization: Spot instances, Serverless Inference, Managed Spot Training.
- MLOps: Understand the flow of SageMaker Pipelines, Model Monitor, and Model Registry.
- Data Services: Know Glue, Lake Formation, Athena, and S3 partitioning strategies.
- Security: VPC, IAM roles, KMS encryption, and SageMaker network isolation.