ml engineer

100+ ml engineer Interview Questions and Answers

Updated 11 Jul 2025
search-icon

Asked in Air India

2d ago

Q. How to evaluate regression models? explain r squared and adjusted r squared and difference between them

Ans.

Regression models can be evaluated using R squared and adjusted R squared to measure the goodness of fit.

  • R squared measures the proportion of the variance in the dependent variable that is predictable from the independent variables.

  • Adjusted R squared adjusts for the number of predictors in the model, providing a more accurate measure of goodness of fit.

  • R squared can be artificially inflated by adding more predictors, while adjusted R squared penalizes for adding unnecessary v...read more

Asked in Air India

5d ago

Q. bagging and boosting and their difference, what is ensemble models, how to handle overfitting, explain precision recall roc curve

Ans.

Explanation of bagging, boosting, ensemble models, handling overfitting, and precision-recall-ROC curve.

  • Bagging (Bootstrap Aggregating) involves training multiple models on different subsets of the training data and combining their predictions through averaging or voting.

  • Boosting involves training multiple models sequentially, with each model correcting the errors of its predecessor.

  • Ensemble models combine multiple individual models to improve overall performance and generali...read more

Asked in Air India

1d ago

Q. Explain working of decision trees, how to select parent and child nodes, gini impurity, etc?

Ans.

Decision trees are a popular machine learning algorithm used for classification and regression tasks.

  • Decision trees are a flowchart-like structure where each internal node represents a feature or attribute, each branch represents a decision rule, and each leaf node represents the outcome.

  • To select parent and child nodes, the algorithm calculates the best split at each node based on criteria like Gini impurity or information gain.

  • Gini impurity is a measure of how often a rando...read more

Asked in Air India

2d ago

Q. What does correlation mean? what is the interpretation if the correlation is 0?

Ans.

Correlation measures the strength and direction of a relationship between two variables. A correlation of 0 indicates no linear relationship.

  • Correlation measures the degree to which two variables move in relation to each other. It ranges from -1 to 1.

  • A correlation of 0 means there is no linear relationship between the variables. They are not related in a linear fashion.

  • For example, if the correlation between hours of study and exam scores is 0, it means there is no linear rel...read more

Are these interview questions helpful?

Asked in Air India

1d ago

Q. create dictionary in python from 2 list and key values, sql query for window functions-Rank(), all joins in sql

Ans.

Creating dictionary in Python from 2 lists, using window functions and joins in SQL

  • To create a dictionary in Python from 2 lists and key values, you can use the zip() function

  • Example: dict(zip(keys_list, values_list))

  • For SQL window functions like Rank(), you can use the OVER() clause

  • Example: SELECT column1, column2, RANK() OVER(ORDER BY column3) AS rank_column FROM table_name

  • For SQL joins, you can use INNER JOIN, LEFT JOIN, RIGHT JOIN, or FULL JOIN depending on the requiremen...read more

Q. What is the difference between stochastic gradient descent, batch gradient descent, and gradient descent?

Ans.

Stochastic gradient descent, batch gradient descent, and gradient descent differ in the amount of data used to update the model weights.

  • Gradient descent updates the model weights using the entire dataset in each iteration.

  • Batch gradient descent updates the model weights using a subset of the dataset (batch) in each iteration.

  • Stochastic gradient descent updates the model weights using only one data point at a time in each iteration.

  • Stochastic gradient descent is faster but mor...read more

ml engineer Jobs

IBM India Pvt. Limited logo
ML Engineer-Advanced Analytics 2-5 years
IBM India Pvt. Limited
3.9
Navi Mumbai
SAP India Pvt.Ltd logo
Senior ML engineer - SAP Business AI - SAP Knowledge Graph 5-10 years
SAP India Pvt.Ltd
4.2
Bangalore / Bengaluru
Siemens Limited logo
Lead AIML Engineer – NLP & Generative AI 7-12 years
Siemens Limited
4.0
Bangalore / Bengaluru

Q. how you have deployed your model and how to monitor the deployed model?

Ans.

I have deployed models using cloud services like AWS SageMaker and monitored them using tools like Prometheus and Grafana.

  • Deployed models using AWS SageMaker for easy scalability and management

  • Utilized Prometheus and Grafana for monitoring model performance and health

  • Set up alerts for abnormal behavior or performance degradation

  • Regularly reviewed logs and metrics to ensure model is functioning as expected

Q. What are the parameters of a Large Language Model (LLM) and what are its use cases?

Ans.

LLMs are large neural network models used for natural language processing tasks.

  • Parameters include model size, number of layers, attention mechanisms, and training data size.

  • Use cases include text generation, translation, summarization, and sentiment analysis.

  • Examples of LLMs are GPT-3, BERT, and XLNet.

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Asked in Air India

1d ago

Q. Explain regularization techniques, difference between ridge and lasso?

Ans.

Regularization techniques help prevent overfitting in machine learning models. Ridge regression adds L2 regularization, while Lasso regression adds L1 regularization.

  • Regularization techniques help prevent overfitting by adding a penalty term to the loss function.

  • Ridge regression adds the squared magnitude of coefficients as penalty term (L2 regularization).

  • Lasso regression adds the absolute magnitude of coefficients as penalty term (L1 regularization).

  • Ridge regression tends t...read more

3d ago

Q. What is the difference between overfitting and underfitting?

Ans.

Overfitting occurs when a model learns the training data too well, leading to poor generalization. Underfitting occurs when a model is too simple to capture the underlying patterns in the data.

  • Overfitting: model performs well on training data but poorly on unseen data

  • Underfitting: model is too simple and fails to capture the underlying patterns in the data

  • Overfitting can be addressed by using techniques like regularization, cross-validation, and early stopping

  • Underfitting can...read more

Asked in Whatfix

2d ago

Q. How do you decide whether to use a wider or deeper neural network?

Ans.

The decision between wider or deeper neural networks depends on the complexity of the data and the trade-off between computational resources and performance.

  • Consider the complexity of the data: Deeper networks are better for more complex data, while wider networks are better for simpler data.

  • Evaluate computational resources: Deeper networks require more computational resources and training time compared to wider networks.

  • Experiment with both architectures: Try training models...read more

Asked in HP India

2d ago

Q. How do you monitor and train an LLM after it has been built and deployed?

Ans.

Monitor and train a LLM by tracking performance metrics, updating data, retraining model, and implementing feedback loops.

  • Track performance metrics such as accuracy, precision, recall, and F1 score to monitor model performance.

  • Update training data regularly to keep the model up-to-date with new information and trends.

  • Retrain the model periodically using the updated data to improve its performance and adapt to changes.

  • Implement feedback loops to continuously improve the model ...read more

Asked in HP India

2d ago

Q. What metrics do you use to evaluate an LLM and decide whether to fine-tune it?

Ans.

Metrics used to evaluate a LLM and decide to fine tune it

  • Accuracy

  • Precision and Recall

  • F1 Score

  • Confusion Matrix

  • ROC Curve and AUC

Asked in Shaip

1d ago

Q. How do you ensure there are no duplicate images in the given set?

Ans.

To ensure no duplicate images, we can use image hashing techniques to compare and identify similar images.

  • Compute image hashes using algorithms like perceptual hashing (e.g., pHash)

  • Compare the hashes of all images to identify duplicates

  • Consider using image similarity metrics to set a threshold for similarity

  • Apply clustering algorithms to group similar images together

  • Leverage machine learning models to classify and detect duplicate images

Asked in TCS

4d ago

Q. What is the difference between object detection and image segmentation?

Ans.

Object detection identifies objects in an image, while segmentation assigns a label to each pixel in the image.

  • Object detection involves identifying and locating objects within an image, often using bounding boxes.

  • Segmentation assigns a class label to each pixel in the image, creating a pixel-wise mask for each object.

  • Object detection is typically used when the goal is to identify and locate multiple objects in an image, while segmentation is used for pixel-level understandin...read more

Asked in Tredence

1d ago

Q. What is the difference between Precision and Recall?

Ans.

Precision is the ratio of correctly predicted positive observations to the total predicted positive observations, while Recall is the ratio of correctly predicted positive observations to the all observations in actual class.

  • Precision focuses on the accuracy of positive predictions, while Recall focuses on the proportion of actual positives that were correctly identified.

  • Precision = TP / (TP + FP)

  • Recall = TP / (TP + FN)

  • Precision is important when the cost of false positives i...read more

6d ago

Q. Explain a data science project you have worked on.

Ans.

Developed a predictive model to identify potential customer churn for a telecom company

  • Performed exploratory data analysis to identify key features affecting customer churn

  • Preprocessed data by handling missing values and encoding categorical variables

  • Built and compared various machine learning models including logistic regression, decision tree, and random forest

  • Tuned hyperparameters using grid search and cross-validation

  • Achieved an accuracy of 85% and identified key factors ...read more

Asked in LightMetrics

3d ago

Q. Given a binary classification problem, how would you change the thresholding, and how would you calculate the new precision and recall?

Ans.

Adjusting the classification threshold affects precision and recall in binary classification tasks.

  • Thresholding determines the cutoff for classifying positive vs. negative.

  • Lowering the threshold increases true positives but may also increase false positives.

  • Precision = TP / (TP + FP); Recall = TP / (TP + FN).

  • Example: If threshold is 0.5, and you lower it to 0.3, more instances are classified as positive.

  • Adjusting the threshold can help balance precision and recall based on th...read more

6d ago

Q. How do you handle missing values when using K-means clustering?

Ans.

Handle missing values in Kmeans cluster by imputing with mean, median, or mode.

  • Impute missing values with mean, median, or mode of the feature

  • Consider using algorithms like KNN imputation or MICE for more complex cases

  • Drop rows or columns with missing values if they are insignificant in number

  • Normalize data before imputing missing values to avoid bias

2d ago

Q. What is the difference between encoder-only and decoder-only models?

Ans.

Encoder-only models process input data to create representations, while decoder-only models generate output from those representations.

  • Encoder-only models, like BERT, focus on understanding input sequences.

  • Decoder-only models, like GPT, generate text based on previous tokens.

  • Encoder-decoder models, like T5, combine both for tasks like translation.

  • Encoder-only is typically used for classification tasks, while decoder-only is used for text generation.

Asked in goML

4d ago

Q. Write a Python program to find the prime numbers within a given range.

Ans.

Python code to find prime numbers in a given range

  • Iterate through the range of numbers

  • Check if each number is divisible by any number other than 1 and itself

  • If not divisible, then it is a prime number

6d ago

Q. Design a complete MLOps pipeline with all the steps.

Ans.

Designing a complete MLOps pipeline with all the necessary steps.

  • Data collection and preprocessing

  • Model training and evaluation

  • Model deployment

  • Monitoring and feedback loop

  • Automated retraining

  • Version control and collaboration

Asked in LightMetrics

5d ago

Q. What is Confusion metrics? Why it is useful

Ans.

Confusion metrics are used to evaluate the performance of a classification model by measuring the accuracy of predictions.

  • Confusion matrix is a table that describes the performance of a classification model.

  • It shows the number of true positives, true negatives, false positives, and false negatives.

  • From the confusion matrix, various metrics like accuracy, precision, recall, and F1 score can be calculated.

  • These metrics help in understanding how well the model is performing and ...read more

Q. What are the basic concepts of Machine Learning?

Ans.

Machine Learning involves algorithms that enable computers to learn from data and make predictions or decisions without explicit programming.

  • Supervised Learning: Involves training a model on labeled data, such as predicting house prices based on features like size and location.

  • Unsupervised Learning: Involves finding patterns in unlabeled data, such as clustering customers based on purchasing behavior.

  • Reinforcement Learning: A type of learning where an agent learns to make dec...read more

Asked in Micro1

3d ago

Q. How LLM works and what all LLMS have been used

Ans.

LLM stands for Large Language Models, which are AI models trained on vast amounts of text data to understand and generate human language.

  • LLMs use deep learning techniques to process and understand language data.

  • Some popular LLMS include GPT-3 (Generative Pre-trained Transformer 3) by OpenAI and BERT (Bidirectional Encoder Representations from Transformers) by Google.

  • LLMs have been used in various applications such as natural language processing, text generation, chatbots, and...read more

6d ago

Q. The second round will involve Python coding questions related to inheritance, decorators, and OOP concepts.

Ans.

Understanding Python concepts like inheritance, decorators, and OOP is crucial for ML engineering.

  • Inheritance allows a class to inherit attributes and methods from another class. Example: class Dog(Animal):

  • Decorators are functions that modify the behavior of another function. Example: @staticmethod, @classmethod.

  • OOP principles include encapsulation, inheritance, and polymorphism. Example: Using classes to model real-world entities.

Asked in Wipro

3d ago

Q. What are the hyperparameters of Random Forest?

Ans.

Hyperparameters of Random Forest include number of trees, max depth of trees, minimum samples per leaf, and maximum features.

  • Number of trees: Determines the number of decision trees in the forest.

  • Max depth of trees: Controls the maximum depth of each decision tree.

  • Minimum samples per leaf: Specifies the minimum number of samples required to be at a leaf node.

  • Maximum features: Determines the maximum number of features to consider when looking for the best split.

Asked in Accenture

4d ago

Q. Write code to sort a list without using built-in functions.

Ans.

Implement a sorting algorithm to sort a list without using built-in functions.

  • Use a common sorting algorithm like bubble sort, selection sort, or insertion sort.

  • Iterate through the list and compare adjacent elements to swap them if necessary.

  • Repeat the process until the list is sorted in ascending order.

Asked in Ganit Inc

1d ago

Q. Share any cloud experience with AWS.

Ans.

I have experience in deploying and managing applications on AWS cloud platform.

  • Deployed and managed a web application on AWS Elastic Beanstalk

  • Used AWS Lambda for serverless computing

  • Configured and managed EC2 instances for various projects

  • Used S3 for storing and retrieving data

  • Set up and managed RDS instances for databases

  • Used CloudFormation for infrastructure as code

  • Implemented auto-scaling and load balancing for high availability

  • Used CloudWatch for monitoring and logging

  • Imp...read more

Asked in TCS

4d ago

Q. What is the difference between delete and update?

Ans.

Delete removes a record entirely, while update modifies an existing record.

  • Delete removes the entire record from the database

  • Update modifies specific fields of an existing record

  • Delete is irreversible, while update can be undone by another update

  • Example: Deleting a user account vs updating the user's email address

1
2
3
4
Next

Interview Experiences of Popular Companies

TCS Logo
3.6
 • 11.1k Interviews
Google Logo
4.4
 • 899 Interviews
Qualcomm Logo
3.8
 • 272 Interviews
Tiger Analytics Logo
3.7
 • 232 Interviews
View all
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
ml engineer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits