Courseiva

NCA-GENL Core Machine Learning and AI Knowledge Practice Question

A data science team at a retail company is building a neural network to predict customer churn from tabular data with mixed numerical and categorical features. They want the model to output a probability between 0 and 1, and they are training with a standard gradient descent optimizer. Which loss function is most appropriate for this binary classification task?

⚠ Common exam trap

The trap here is assuming mean squared error is universally safe, when its gradient with a sigmoid output becomes vanishingly small for confident mistakes.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Binary cross-entropy loss

Binary cross-entropy is the standard loss for binary classification with a sigmoid output. It directly optimizes the log-likelihood of the correct class, yielding strong gradients when predictions are wrong and well-calibrated probabilities. The other losses either assume multiclass targets, produce non-probabilistic outputs, or suffer from vanishing gradients with sigmoid units.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Binary cross-entropy loss

    Why this is correct

    Binary cross-entropy measures the dissimilarity between the predicted probability and the true binary label, providing well-behaved gradients for logistic outputs. It penalizes confident wrong predictions heavily, which suits churn prediction where calibrated probabilities matter. With a sigmoid output unit, its derivative simplifies to the prediction error, making optimization stable and efficient for this scenario.

  • ✗

    Categorical cross-entropy loss

    Why it's wrong here

    Categorical cross-entropy expects a one-hot encoded target across multiple mutually exclusive classes and a softmax output. Applying it to a single binary label with a sigmoid output would require reshaping the target and output, adding unnecessary complexity and potential label mismatch. It is designed for multiclass problems, not the binary churn prediction described here.

  • ✗

    Mean squared error loss

    Why it's wrong here

    Although mean squared error can be applied to binary targets, it produces weak gradients when the sigmoid saturates, slowing convergence and yielding poorer probability estimates. For classification, it is not the standard choice because it treats errors linearly rather than penalizing confident misclassifications. In this churn scenario, it would likely degrade accuracy and calibration compared to cross-entropy.

  • ✗

    Hinge loss

    Why it's wrong here

    Hinge loss is tailored for maximum-margin classifiers such as support vector machines, where the output is a raw score and the goal is a decision boundary rather than a probability. It does not naturally produce probabilities between 0 and 1, and it ignores the confidence of correct predictions beyond the margin. For probabilistic churn prediction, it is not appropriate.

About these practice questions

Courseiva writes every NCA-GENL question from scratch — 367 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official NVIDIA exam blueprint

This NCA-GENL practice question is part of Courseiva's free NVIDIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the NCA-GENL exam.