PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Statistics & Math/Intuit

Compute Precision, Recall, and F1

Last updated: Mar 29, 2026

Quick Overview

This question evaluates competency in computing and interpreting binary classification metrics—precision, recall, and F1—along with understanding thresholding of confidence scores and handling edge cases like zero denominators.

  • medium
  • Intuit
  • Statistics & Math
  • Data Scientist

Compute Precision, Recall, and F1

Company: Intuit

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Technical Screen

You are given a list of binary classification outputs, where each record contains: - `actual` INT (`0` or `1`) - `predict` INT (`0` or `1`) - `conf` FLOAT, the model's confidence score for the positive class Example record: `[actual=1, predict=0, conf=0.93]`. Write Python or pseudocode to compute the following metrics for the positive class over the full dataset: - `precision` - `recall` - `F1 score` Also explain: - how to derive `predict` from `conf` if the interviewer asks you to apply a threshold instead of using the provided predicted labels - how to handle edge cases where a denominator becomes zero

Quick Answer: This question evaluates competency in computing and interpreting binary classification metrics—precision, recall, and F1—along with understanding thresholding of confidence scores and handling edge cases like zero denominators.

Related Interview Questions

  • Calculate Precision, Recall, and F1 - Intuit (medium)
  • Choose the right test for proportions - Intuit (hard)
Intuit logo
Intuit
Feb 23, 2026, 12:00 AM
Data Scientist
Technical Screen
Statistics & Math
11
0

You are given a list of binary classification outputs, where each record contains:

  • actual INT ( 0 or 1 )
  • predict INT ( 0 or 1 )
  • conf FLOAT, the model's confidence score for the positive class

Example record: [actual=1, predict=0, conf=0.93].

Write Python or pseudocode to compute the following metrics for the positive class over the full dataset:

  • precision
  • recall
  • F1 score

Also explain:

  • how to derive predict from conf if the interviewer asks you to apply a threshold instead of using the provided predicted labels
  • how to handle edge cases where a denominator becomes zero

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Statistics & Math•More Intuit•More Data Scientist•Intuit Data Scientist•Intuit Statistics & Math•Data Scientist Statistics & Math
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.