yoklainterview sim

ML Engineer Interview Questions

600 verified ML Engineer interview questions — solve with answers, learn from explanations, test yourself in a real simulation.

Try the real simulation →

Sample questions

Ml Data PreparationDifficulty 1
What best describes 'feature engineering' in a machine learning pipeline?
  • aCollecting raw records into a single table
  • bCreating or transforming input variables
  • cAdjusting a model's parameters during training
  • dMeasuring accuracy on unseen data
Explanation:Feature engineering is about shaping the input variables (raw or derived) that a model consumes, not about the training algorithm itself or evaluation afterward. Good features often matter more for final performance than the choice of algorithm.
Ml Data PreparationDifficulty 2
A dataset has one feature ranging roughly 0-1 and another ranging roughly 0-1,000,000. Left unaddressed before training a distance- or gradient-based model, what problem does this most likely cause?
  • aTraining fails due to missing values
  • bCategorical columns get encoded in the wrong order
  • cTest-set information leaks into training
  • dThe large-scale feature dominates the model
Explanation:When features live on very different numeric scales, the feature with the larger range tends to dominate distance calculations or gradient magnitudes, effectively drowning out the smaller-scale feature's signal. This is a core motivation for scaling features to comparable ranges before training such models.
Ml Data PreparationDifficulty 2
A dataset has a 'city' column with values like Istanbul, Ankara, Izmir. A junior engineer maps these to integers alphabetically (Ankara=0, Istanbul=1, Izmir=2) and feeds them directly into a model that treats numeric inputs as ordered/continuous. What is the main risk?
  • aThe model may infer a false order between cities
  • bThe model auto-detects that the encoding is unordered
  • cThe category count shrinks after mapping
  • dText columns can never be encoded for any model
Explanation:Assigning arbitrary ordered integers to unordered categories introduces a false sense of magnitude and order (e.g., implying Izmir is 'twice' Ankara), which can mislead models that treat the input as ordered/continuous. Encoding choices need to respect whether a categorical variable actually has an inherent order.
Ml Data PreparationDifficulty 1
Conceptually, what is the difference between rescaling a feature to a fixed range like 0-1 and rescaling it to have zero mean and unit variance?
  • aOne applies only to text, the other only to numbers
  • bThey are the exact same transformation
  • cOne bounds to a range, the other centers on the mean
  • dOne removes outliers, the other requires them removed first
Explanation:Rescaling to a fixed range and centering around the mean with unit variance are both ways of putting features on a comparable scale, but they compute different quantities (min/max range vs. mean/variance) and can behave differently in the presence of outliers.
Ml Data PreparationDifficulty 2
A junior engineer computes the scaling parameters (e.g., min/max or mean/variance) for a feature using the entire dataset, then splits the data into train and test afterward. What is the problem with this order of operations?
  • aScaling parameters computed this way are always wrong
  • bTest-set statistics leak into the training scaling
  • cCategorical columns become impossible to encode
  • dThe training set always ends up smaller than intended
Explanation:Fitting any data-derived statistic (scaling parameters, imputation values, encodings) on the full dataset before splitting lets test-set information influence what the model sees during training — a classic form of data leakage. The fix is to fit such transformations only on the training split, then apply them to validation/test.
Ml Data PreparationDifficulty 3
A model predicting whether a loan will default includes a feature called 'days_since_last_payment_before_default', which is only populated (non-null) for loans that actually defaulted and is computed from records logged after the default event. What is the main issue with using this feature?
  • aIt has too many missing values to be useful
  • bIt is a categorical feature disguised as numeric
  • cIt needs to be scaled with the other features
  • dIt is target leakage — only known after the outcome
Explanation:A feature that is only populated because the target outcome already happened (and derived from post-outcome records) is a textbook case of target leakage: the model would learn to rely on information that does not exist at the moment a real prediction is needed, producing unrealistically strong offline metrics that collapse in production.

Test yourself against the 600-question ML Engineer bank.

Start interview