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
ExperiencesCoaching
New
Practice
Mock InterviewsTimed interview simulations with feedbackSuccess 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
Get started

Handle Payment Fraud Class Imbalance

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

Whenever you're ready, walk me through how you'd approach this.

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

Problem

Business Context

Microsoft Store processes millions of payment attempts each month across cards, wallets, gift balances, and digital subscriptions. Fraud losses are material, but excessive false positives also block legitimate customers and create support costs, so the fraud model must perform well on a highly imbalanced dataset.

Dataset

You are given a historical transaction dataset used for post-authorization fraud labeling.

Feature GroupCountExamples
Transaction attributes14amount, currency, payment_method, merchant_category, is_digital_good
Customer behavior11account_age_days, prior_chargebacks_90d, failed_logins_7d, avg_order_value_30d
Device and network9device_id_hash, browser_family, IP_country, ASN_risk_score
Velocity features8txns_last_10m, cards_per_device_24h, amount_sum_1h, distinct_accounts_per_ip_24h
Risk signals6AVS_result, CVV_result, 3DS_used, email_domain_risk, geodistance_km
  • Size: 4.8M transactions over 9 months, 48 modeled features
  • Target: Binary fraud label confirmed within 45 days of transaction settlement
  • Class balance: 0.42% fraud, 99.58% non-fraud
  • Missing data: 18% missing in AVS/CVV-related fields, 7% missing in device attributes, and sparse values for new users

Success Criteria

A strong solution should:

  • achieve recall >= 75% on fraudulent transactions,
  • maintain precision >= 18% at the operating threshold,
  • deliver PR-AUC >= 0.30, and
  • produce a ranked fraud score usable in Microsoft Azure batch scoring and near-real-time review queues.

Constraints

  • Inference latency must stay under 50 ms p95 per transaction in Azure Machine Learning online endpoints.
  • The fraud operations team needs feature-level explanations for manual review.
  • Labels arrive with delay, so validation must avoid temporal leakage.
  • The review queue can only inspect the top 1.5% of scored transactions.

Deliverables

  1. Propose a modeling strategy for severe class imbalance in fraud detection.
  2. Explain how you would split data, engineer features, and avoid leakage.
  3. Train and evaluate a production-ready classifier with threshold tuning.
  4. Show how you would measure business impact using ranking and classification metrics.
  5. Describe deployment and monitoring considerations in Azure Machine Learning.