ML Domain-Specific Coding Challenges Questions
Coding challenges and exercises focused on applying machine learning techniques to domain-specific problems, including data preprocessing, feature engineering, model selection, training, evaluation, and deployment considerations within ML systems.
MediumTechnical
94 practiced
Explain the bias-variance trade-off in supervised learning. Discuss how model complexity, dataset size, regularization, and ensemble methods affect bias and variance. Include a short description of techniques to empirically estimate bias and variance on a regression task.
MediumTechnical
66 practiced
Write a SQL query (Postgres-compatible) to compute rolling features per user: last_7_day_sum and last_7_day_count of transaction amounts. Given table 'transactions(transaction_id PK, user_id INT, amount NUMERIC, occurred_at TIMESTAMP)'. Use window functions to produce for every transaction row the sum and count over the previous 7 days (inclusive). Show sample SQL and explain assumptions about late-arriving events.
EasyTechnical
95 practiced
Explain precision, recall and F1-score for a binary classification problem. Provide the mathematical formulas (using TP, FP, TN, FN), discuss when F1 is more appropriate than accuracy, and describe when precision-recall curves are preferred over ROC curves (include a brief note about class imbalance). Provide a short example where precision matters more than recall.
MediumTechnical
78 practiced
Given an interactions log of (user_id, item_id, timestamp) for an implicit feedback recommender, implement a function generate_negative_samples(interactions: List[Tuple[int,int,int]], num_neg_per_pos: int=1, popularity_weighting: bool=True) -> List[Tuple[int,int,int,label]] that yields training triplets with label 1 for positives and 0 for negatives. Constraints: ensure negatives for a user are not items they've interacted with and scale to large datasets (discuss memory considerations).
MediumTechnical
74 practiced
Using scikit-learn, construct a Pipeline that imputes missing values for numeric columns, scales them, selects top-k features by mutual information with the target, and fits a RandomForestClassifier. Provide the Python code to build this Pipeline with ColumnTransformer handling different column sets. Explain how you would integrate this into cross-validation safely.
Unlock Full Question Bank
Get access to hundreds of ML Domain-Specific Coding Challenges interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.