Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Build my plan

Detect Card Fraud with Imbalanced Data

EasyMachine Learning00:00
Practice interviewer
In session
5 left
00:00

Your question is Detect Card Fraud with Imbalanced Data. Take a moment with it on the right.

Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).

You need to log in / sign up to chat or submit.

Problem

Business Context

PayFlow processes roughly 8 million card transactions per day. Fraud is rare but costly, and the risk team needs a model that flags suspicious transactions without overwhelming manual reviewers with false positives.

Dataset

You are given a historical transaction dataset for binary classification.

Feature GroupCountExamples
Transaction attributes12amount, currency, merchant_category, card_present, payment_channel
Customer behavior10avg_txn_7d, txn_count_24h, chargebacks_90d, account_age_days
Merchant signals6merchant_risk_score, country, device_consistency, velocity_score
Device / location8device_id_hash, ip_country, distance_from_home, browser_type
Temporal features4hour_of_day, day_of_week, is_holiday, seconds_since_last_txn
  • Size: 1.2M transactions, 40 features
  • Target: is_fraud (1 = fraudulent, 0 = legitimate)
  • Class balance: 0.7% fraud, 99.3% non-fraud
  • Missing data: ~12% missing in device fields, ~4% missing in merchant metadata, sparse missingness elsewhere

Success Criteria

A good solution should improve fraud capture materially over a majority-class baseline. Target at least 75% recall on fraud while keeping precision above 15% for the review queue, and achieve PR AUC above 0.30 on the holdout set.

Constraints

  • Batch scoring every 15 minutes; average inference latency should stay under 50 ms per transaction.
  • The fraud operations team needs feature-level explanations for flagged transactions.
  • False positives are expensive because analysts can review only ~5,000 transactions per day.

Deliverables

  1. Build a classification pipeline that handles the severe class imbalance correctly.
  2. Explain how you would compare class weighting, resampling, and threshold tuning.
  3. Choose evaluation metrics appropriate for rare-event detection and justify them.
  4. Produce a validation strategy that avoids leakage from customer or time-based patterns.
  5. Recommend a production-ready model, decision threshold, and monitoring plan.