PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Machine Learning/Meta

Explain key ML metrics and techniques

Last updated: Mar 29, 2026

Quick Overview

This question evaluates understanding of core Machine Learning concepts including classification evaluation metrics, ensemble methods (bagging vs. boosting), regularization (L1 vs. L2), and two-layer neural network forward computation, testing both model-evaluation and model-building competencies.

  • medium
  • Meta
  • Machine Learning
  • Software Engineer

Explain key ML metrics and techniques

Company: Meta

Role: Software Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Technical Screen

You are asked a set of short conceptual machine learning questions. 1. **Confusion matrix and metrics** For a binary classification problem: - Define the entries of the confusion matrix: true positive (TP), false positive (FP), true negative (TN), and false negative (FN). - Using TP, FP, TN, FN, write formulas for accuracy, precision, recall, and (optionally) F1-score. - Briefly explain in words what precision and recall each measure. 2. **Ensemble learning** - What is ensemble learning? - Why can combining multiple base models into an ensemble improve performance? - Briefly describe common ways to combine model outputs. 3. **Bagging vs. boosting** Compare bagging and boosting along these dimensions: - How each method constructs training sets and trains base learners. - Whether each method primarily reduces bias, variance, or both. - The main advantages and disadvantages of each. - Name at least one common algorithm that uses bagging and one that uses boosting. 4. **L1 vs. L2 regularization** Consider a supervised learning model with loss function `L(w)` over parameters `w` and a regularization term with strength `λ` (lambda): - Write the objective for L1-regularized training and L2-regularized training. - Explain how L1 and L2 regularization each affect the learned parameters (e.g., sparsity vs. shrinkage). - Discuss when you might prefer L1 over L2, and vice versa. 5. **Two-layer neural network forward pass** Consider a simple two-layer feedforward neural network: input → hidden layer → output layer. - Let the input vector be `x`. The hidden layer uses weight matrix `W1` and bias vector `b1` with activation function `g` applied elementwise. - The output layer uses weight matrix `W2` and bias vector `b2` with activation function `f` (e.g., identity, sigmoid, or softmax). (a) Write the mathematical expressions for the hidden activations and final output in terms of `x`, `W1`, `b1`, `W2`, `b2`, `g`, and `f`. (b) Briefly describe how you would carry out a concrete numerical computation of the network output given specific numeric values for these quantities.

Quick Answer: This question evaluates understanding of core Machine Learning concepts including classification evaluation metrics, ensemble methods (bagging vs. boosting), regularization (L1 vs. L2), and two-layer neural network forward computation, testing both model-evaluation and model-building competencies.

Related Interview Questions

  • Design and evaluate an ads ranking algorithm - Meta (easy)
  • How would you design a Shop Ads ranking algorithm? - Meta (easy)
  • Derive Linear Regression Solution - Meta (medium)
  • Design an ad recommendation ranking approach - Meta (easy)
  • Build harmful-content text classifier - Meta (medium)
Meta logo
Meta
Dec 8, 2025, 12:00 AM
Software Engineer
Technical Screen
Machine Learning
3
0

You are asked a set of short conceptual machine learning questions.

  1. Confusion matrix and metrics
    For a binary classification problem:
    • Define the entries of the confusion matrix: true positive (TP), false positive (FP), true negative (TN), and false negative (FN).
    • Using TP, FP, TN, FN, write formulas for accuracy, precision, recall, and (optionally) F1-score.
    • Briefly explain in words what precision and recall each measure.
  2. Ensemble learning
    • What is ensemble learning?
    • Why can combining multiple base models into an ensemble improve performance?
    • Briefly describe common ways to combine model outputs.
  3. Bagging vs. boosting
    Compare bagging and boosting along these dimensions:
    • How each method constructs training sets and trains base learners.
    • Whether each method primarily reduces bias, variance, or both.
    • The main advantages and disadvantages of each.
    • Name at least one common algorithm that uses bagging and one that uses boosting.
  4. L1 vs. L2 regularization
    Consider a supervised learning model with loss function L(w) over parameters w and a regularization term with strength λ (lambda):
    • Write the objective for L1-regularized training and L2-regularized training.
    • Explain how L1 and L2 regularization each affect the learned parameters (e.g., sparsity vs. shrinkage).
    • Discuss when you might prefer L1 over L2, and vice versa.
  5. Two-layer neural network forward pass
    Consider a simple two-layer feedforward neural network: input → hidden layer → output layer.
    • Let the input vector be x . The hidden layer uses weight matrix W1 and bias vector b1 with activation function g applied elementwise.
    • The output layer uses weight matrix W2 and bias vector b2 with activation function f (e.g., identity, sigmoid, or softmax).
      (a) Write the mathematical expressions for the hidden activations and final output in terms of x , W1 , b1 , W2 , b2 , g , and f .
      (b) Briefly describe how you would carry out a concrete numerical computation of the network output given specific numeric values for these quantities.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Machine Learning•More Meta•More Software Engineer•Meta Software Engineer•Meta Machine Learning•Software Engineer Machine Learning
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.