Fatskills
Practice. Master. Repeat.
Study Guide: Cloud ML - Google Cloud Professional Machine Learning Engineer: Algorithm Selection (Linear/Logistic, Tree‑based, Deep Learning, Time‑series, NLP, CV)
Source: https://www.fatskills.com/machine-learning-101/chapter/cloud-ml-cert-gcp-ml-algorithm-selection-linearlogistic-treebased-deep-learning-timeseries-nlp-cv

Cloud ML - Google Cloud Professional Machine Learning Engineer: Algorithm Selection (Linear/Logistic, Tree‑based, Deep Learning, Time‑series, NLP, CV)

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~8 min read

GCP_ML – Algorithm Selection (Linear/Logistic, Tree‑based, Deep Learning, Time‑series, NLP, CV)


Google Cloud Professional Machine Learning Engineer – Algorithm Selection Study Guide


What This Is

Algorithm selection is the process of choosing the right ML model type (e.g., linear, tree-based, deep learning, time-series, NLP, or computer vision) based on data characteristics, business goals, and operational constraints. This is critical because the wrong choice leads to poor performance, wasted compute, or unmaintainable pipelines. Real-world scenario: A retail company wants to predict customer churn (binary classification) but also forecast next-month revenue (regression). Should they use a single XGBoost model for both tasks, or separate Logistic Regression (churn) and Prophet (revenue) models? The answer depends on data size, interpretability needs, and latency requirements.


Key Terms & Services


General ML Concepts

  • Bias-Variance Tradeoff: The balance between underfitting (high bias, e.g., linear models on complex data) and overfitting (high variance, e.g., deep neural networks on small datasets). GCP’s Vertex AI Hyperparameter Tuning helps optimize this.
  • Feature Importance: Metrics (e.g., SHAP values, Gini importance) that explain which features drive model predictions. Vertex AI Explainable AI provides this for GCP models.
  • Embeddings: Dense vector representations of data (e.g., text, images) used in deep learning. Vertex AI Embeddings (via Text Embedding API or Multimodal Embedding API) generates these for NLP/CV tasks.

GCP-Specific Services

  • Vertex AI Training: Managed service to train custom ML models (supports scikit-learn, XGBoost, TensorFlow, PyTorch). Best for custom algorithm selection (e.g., choosing between Linear Learner vs. XGBoost).
  • AutoML Tables: No-code solution for structured data (tabular). Automatically tests linear models, tree-based models (XGBoost, Random Forest), and neural networks, then picks the best one. Ideal for quick prototyping or when ML expertise is limited.
  • AutoML Vision/Natural Language: Pre-trained models for image classification, object detection, text sentiment, entity extraction, etc. Fine-tunes EfficientNet (CV) or BERT (NLP) under the hood.
  • Vertex AI Forecasting: Managed time-series forecasting using Prophet, ARIMA, or deep learning (LSTMs). Handles seasonality, holidays, and missing data automatically.
  • Vertex AI Matching Engine: Vector database for similarity search (e.g., recommendation systems, semantic search). Uses approximate nearest neighbor (ANN) for low-latency retrieval.
  • TensorFlow Enterprise: Optimized version of TensorFlow for GCP, with pre-built containers for deep learning (CNNs, RNNs, Transformers). Best for custom CV/NLP models.
  • BigQuery ML: Lets you train linear regression, logistic regression, XGBoost, and deep learning models directly in SQL. Best for quick analysis on large datasets without moving data.


Step-by-Step: Algorithm Selection Process


1. Define the Problem Type

  • Classification (binary/multi-class): Predict categories (e.g., spam/not spam, customer churn).
  • GCP Tools: AutoML Tables, Vertex AI Training (XGBoost, Logistic Regression), BigQuery ML.
  • Regression: Predict continuous values (e.g., house prices, sales forecasts).
  • GCP Tools: AutoML Tables, Vertex AI Training (Linear Regression, XGBoost), BigQuery ML.
  • Time-Series Forecasting: Predict future values based on historical data (e.g., stock prices, demand forecasting).
  • GCP Tools: Vertex AI Forecasting (Prophet, ARIMA, LSTM), BigQuery ML.
  • NLP: Text classification, sentiment analysis, entity recognition, translation.
  • GCP Tools: AutoML Natural Language, Vertex AI Training (BERT, T5), Text Embedding API.
  • Computer Vision (CV): Image classification, object detection, segmentation.
  • GCP Tools: AutoML Vision, Vertex AI Training (EfficientNet, ResNet), Vision API.
  • Recommendation Systems: Personalized suggestions (e.g., product recommendations).
  • GCP Tools: Vertex AI Matching Engine (vector search), TensorFlow Recommenders (TFRS).

2. Analyze Data Characteristics

Data Factor Recommended Algorithm GCP Service
Small tabular data (<10K rows) Logistic/Linear Regression, Decision Trees BigQuery ML, AutoML Tables
Large tabular data (>100K rows) XGBoost, Random Forest, Neural Networks Vertex AI Training, AutoML Tables
High-dimensional data (text, images) Deep Learning (CNNs, Transformers) AutoML Vision/NLP, Vertex AI Training
Time-series data Prophet, ARIMA, LSTM Vertex AI Forecasting, BigQuery ML
Unstructured data (text, images) BERT (NLP), EfficientNet (CV) AutoML Natural Language/Vision
Low-latency inference Linear models, XGBoost, Lightweight DNNs Vertex AI Endpoints, BigQuery ML

3. Evaluate Tradeoffs

  • Interpretability vs. Performance:
  • Interpretability needed?Linear models, Decision Trees, XGBoost (with SHAP).
  • Performance > interpretability?Deep learning (BERT, EfficientNet).
  • Training Speed vs. Accuracy:
  • Fast training?Linear models, XGBoost.
  • High accuracy?Deep learning (but slower training).
  • Deployment Constraints:
  • Low-latency inference?XGBoost, Lightweight DNNs (e.g., MobileNet).
  • Batch predictions?BigQuery ML, Vertex AI Batch Predictions.

4. Train & Compare Models

  • Option 1: AutoML (No-Code)
  • Use AutoML Tables/Vision/NLP to automatically test multiple algorithms.
  • Example: For a churn prediction task, AutoML Tables might test Logistic Regression, XGBoost, and a DNN, then pick the best one.
  • Option 2: Custom Training (Vertex AI Training)
  • Write a training script (Python) and submit to Vertex AI Training.
  • Example: Train an XGBoost model for fraud detection with custom hyperparameters.
  • Option 3: BigQuery ML (SQL-Based)
  • Train directly in SQL:
    sql
    CREATE MODEL `project.dataset.churn_model`
    OPTIONS(
    model_type='LOGISTIC_REG',
    input_label_cols=['churned']
    ) AS
    SELECT * FROM `project.dataset.customer_data`;

5. Deploy & Monitor

  • Deploy to Vertex AI Endpoints for real-time inference.
  • Monitor drift with Vertex AI Model Monitoring (detects feature skew, prediction drift).
  • Retrain periodically using Vertex AI Pipelines (e.g., scheduled retraining with new data).


Common Mistakes


Mistake 1: Using Deep Learning for Small Tabular Data

  • Why it happens: Candidates assume "bigger models = better performance."
  • Correction: For small tabular datasets (<10K rows), XGBoost or Logistic Regression often outperform deep learning (lower variance, faster training). Use AutoML Tables to compare automatically.

Mistake 2: Ignoring Time-Series Specifics

  • Why it happens: Treating time-series data like regular tabular data (e.g., using XGBoost without lag features).
  • Correction: Use Vertex AI Forecasting (Prophet/ARIMA) or BigQuery ML’s ARIMA_PLUS to handle seasonality, holidays, and trends.

Mistake 3: Overlooking Embeddings for NLP/CV

  • Why it happens: Manually engineering features for text/images instead of using pre-trained embeddings.
  • Correction: For NLP, use Text Embedding API (BERT-based). For CV, use AutoML Vision or pre-trained TensorFlow models (EfficientNet).

Mistake 4: Choosing AutoML When Customization is Needed

  • Why it happens: Assuming AutoML is always the best choice.
  • Correction: AutoML is great for quick prototyping, but Vertex AI Training is better for custom architectures (e.g., Transformers, custom loss functions).

Mistake 5: Not Considering Latency in Production

  • Why it happens: Picking a complex model (e.g., BERT) for a real-time use case without testing inference speed.
  • Correction: For low-latency needs, use distilled models (e.g., DistilBERT), XGBoost, or quantized models. Test with Vertex AI Endpoints before deployment.


Certification Exam Insights


1. Algorithm Selection Traps

  • Trap: The exam often tests whether you know when to use AutoML vs. custom training.
  • Example: A question asks for the fastest way to build a churn model with limited ML expertise. The answer is AutoML Tables (not Vertex AI Training).
  • Trap: Confusing time-series forecasting with regression.
  • Example: A question asks for a model to predict daily sales for the next 30 days. The answer is Vertex AI Forecasting (Prophet/ARIMA), not Linear Regression.

2. Service Selection Scenarios

Scenario Correct GCP Service Why?
Quickly build a text sentiment classifier with no ML code. AutoML Natural Language No training required; fine-tunes BERT automatically.
Train a custom image segmentation model with PyTorch. Vertex AI Training Supports custom containers for PyTorch.
Deploy a low-latency recommendation system using embeddings. Vertex AI Matching Engine Optimized for vector similarity search.
Run batch predictions on millions of images stored in GCS. Vertex AI Batch Predictions Scales automatically; no endpoint needed.
Train a model directly in SQL without moving data. BigQuery ML Supports linear models, XGBoost, and DNNs.

3. Key Constraints to Remember

  • AutoML Tables has a 100K row limit for training (use Vertex AI Training for larger datasets).
  • Vertex AI Forecasting requires at least 30 time points (e.g., 30 days of data).
  • BigQuery ML does not support custom TensorFlow/PyTorch models (only built-in algorithms).
  • Vertex AI Matching Engine requires pre-computed embeddings (use Text Embedding API or AutoML Vision to generate them).


Quick Check Questions


Question 1

A retail company wants to predict customer lifetime value (CLV) (a continuous value) using 5 years of historical transaction data (10M+ rows). They need high accuracy but don’t have deep ML expertise. Which GCP service should they use? - A) AutoML Tables - B) Vertex AI Training with XGBoost - C) BigQuery ML - D) Vertex AI Forecasting

Answer: B) Vertex AI Training with XGBoost
AutoML Tables has a 100K row limit, and BigQuery ML is better for quick analysis (not production-grade accuracy). Vertex AI Training with XGBoost scales to large datasets and provides high accuracy.


Question 2

A healthcare startup needs to classify X-ray images into 3 categories (normal, pneumonia, COVID-19). They have 10K labeled images and need interpretability for regulatory compliance. Which GCP service should they use? - A) AutoML Vision - B) Vertex AI Training with EfficientNet - C) Vision API - D) TensorFlow Enterprise with Grad-CAM

Answer: D) TensorFlow Enterprise with Grad-CAM
AutoML Vision and Vision API are black-box models. Vertex AI Training with EfficientNet is accurate but not interpretable. Grad-CAM (via TensorFlow) provides visual explanations for model decisions, which is critical for healthcare.


Question 3

A logistics company wants to forecast daily package volumes for the next 90 days, accounting for holidays and seasonality. They have 2 years of historical data. Which GCP service should they use? - A) BigQuery ML (Linear Regression) - B) Vertex AI Forecasting (Prophet) - C) AutoML Tables - D) Vertex AI Training (LSTM)

Answer: B) Vertex AI Forecasting (Prophet)
Prophet is designed for time-series forecasting with built-in support for holidays and seasonality. BigQuery ML’s linear regression lacks these features, and LSTMs (Vertex AI Training) require more data and tuning.


Last-Minute Cram Sheet

  1. Small tabular data (<10K rows)?Logistic Regression, Decision Trees (BigQuery ML, AutoML Tables).
  2. Large tabular data (>100K rows)?XGBoost, Random Forest (Vertex AI Training).
  3. Time-series forecasting?Vertex AI Forecasting (Prophet/ARIMA) or BigQuery ML (ARIMA_PLUS).
  4. NLP tasks (text classification, sentiment)?AutoML Natural Language or Text Embedding API (BERT).
  5. Computer Vision (image classification, object detection)?AutoML Vision or Vertex AI Training (EfficientNet).
  6. Recommendation systems?Vertex AI Matching Engine (vector search) or TensorFlow Recommenders.
  7. Low-latency inference?XGBoost, Lightweight DNNs (MobileNet), or quantized models.
  8. Interpretability needed?Linear models, XGBoost (with SHAP), or Vertex AI Explainable AI.
  9. ⚠️ AutoML Tables has a 100K row limit → Use Vertex AI Training for larger datasets.
  10. ⚠️ Vertex AI Forecasting needs ≥30 time points → Don’t use for short time-series.


ADVERTISEMENT