Ml Engineer Interview Questions

2,738 ml engineer interview questions shared by candidates

Question: Moving Average Anomaly Detection Problem: You are given a time series data of daily stock prices in the form of an array prices, where each prices[i] represents the stock price on day i. Implement a function that detects anomalies using a simple moving average (SMA) approach. An anomaly is detected if the stock price deviates from the moving average by more than a certain threshold. Given the list prices, an integer window_size, and a threshold percentage, return a list of days (indices) where anomalies are detected. Input: prices: List of integers representing stock prices over time. window_size: Integer representing the number of days to compute the moving average. threshold: Float representing the percentage deviation from the moving average to be considered an anomaly. Output: A list of indices where anomalies are detected.
avatar

AI/ML Engineer

Interviewed at Google

4.4
Nov 4, 2024

Question: Moving Average Anomaly Detection Problem: You are given a time series data of daily stock prices in the form of an array prices, where each prices[i] represents the stock price on day i. Implement a function that detects anomalies using a simple moving average (SMA) approach. An anomaly is detected if the stock price deviates from the moving average by more than a certain threshold. Given the list prices, an integer window_size, and a threshold percentage, return a list of days (indices) where anomalies are detected. Input: prices: List of integers representing stock prices over time. window_size: Integer representing the number of days to compute the moving average. threshold: Float representing the percentage deviation from the moving average to be considered an anomaly. Output: A list of indices where anomalies are detected.

Viewing 571 - 580 interview questions

Glassdoor has 2,738 interview questions and reports from Ml engineer interviews. Prepare for your interview. Get hired. Love your job.