TGViewer
Artificial Intelligence Artificial Intelligence @machinelearning_deeplearning · 56.3K subscribers
Post #1821 3.24K
🚀 AI Interview Questions with Answers (Part 4)

31. What is the bias-variance tradeoff in Machine Learning?

The bias-variance tradeoff is the balance between a model that is too simple (high bias) and one that is too complex (high variance).

- High Bias: Causes underfitting because the model cannot capture underlying patterns.
- High Variance: Causes overfitting because the model learns noise from the training data.

The goal is to achieve a balance that provides good performance on unseen data.

---

32. What is cross-validation, and why is it important?

Cross-validation is a technique used to evaluate how well a Machine Learning model generalizes to unseen data.

The most common method is K-Fold Cross-Validation, where the dataset is divided into K equal parts. The model is trained K times, each time using a different fold for testing and the remaining folds for training.

Benefits:

- Reduces overfitting
- Provides a more reliable performance estimate
- Makes better use of limited data

---

33. What is feature engineering, and why does it matter?

Feature engineering is the process of creating, transforming, or selecting input features to improve model performance.

Common techniques include:

- Creating new features
- Encoding categorical variables
- Handling missing values
- Scaling numerical features
- Extracting date and time features

Good feature engineering often improves accuracy more than changing algorithms.

---

34. What is feature scaling, and when should it be used?

Feature scaling transforms numerical values to a similar range so that no feature dominates others.

It is especially important for algorithms like:

- K-Nearest Neighbors (KNN)
- Support Vector Machine (SVM)
- K-Means Clustering
- Neural Networks

Common methods:

- Normalization
- Standardization

---

35. What is the difference between normalization and standardization?

Normalization

- Scales values between 0 and 1.
- Best when data has no normal distribution.
- Uses Min-Max Scaling.

Standardization

- Transforms data to have a mean of 0 and a standard deviation of 1.
- Works well when data follows a normal distribution.
- Uses Z-score scaling.

---

36. How do you evaluate the performance of a Machine Learning model?

The evaluation metric depends on the problem type.

For Classification:

- Accuracy
- Precision
- Recall
- F1-Score
- ROC-AUC

For Regression:

- Mean Absolute Error (MAE)
- Mean Squared Error (MSE)
- Root Mean Squared Error (RMSE)
- R² Score

---

37. What is the difference between accuracy and precision?

Accuracy

- Measures the percentage of all predictions that are correct.
- Best when classes are balanced.

Formula:
Accuracy = (Correct Predictions / Total Predictions)

Precision

- Measures how many predicted positive cases are actually positive.

Formula:
Precision = TP / (TP + FP)

Precision is important when false positives are costly, such as spam detection.

---

38. What is the difference between recall and F1-Score?

Recall

- Measures how many actual positive cases were correctly identified.

Formula:
Recall = TP / (TP + FN)

F1-Score

- Harmonic mean of Precision and Recall.

Formula:
F1 = 2 × (Precision × Recall) / (Precision + Recall)

F1-Score is useful when dealing with imbalanced datasets.

---

39. What is a confusion matrix, and how do you interpret it?

A confusion matrix is a table used to evaluate classification models.

It contains four outcomes:

- True Positive (TP): Correctly predicted positive.
- True Negative (TN): Correctly predicted negative.
- False Positive (FP): Incorrectly predicted positive.
- False Negative (FN): Incorrectly predicted negative.

It helps calculate Accuracy, Precision, Recall, and F1-Score.

---

40. What is the ROC-AUC curve, and why is it useful?

The ROC (Receiver Operating Characteristic) Curve plots the True Positive Rate (Recall) against the False Positive Rate at different thresholds.

AUC (Area Under the Curve) measures the model's ability to distinguish between classes.
  • ❤ 4
More from @machinelearning_deeplearning
  1. Sep 22, 2026🚀 Welcome back to our AI Engineer Roadmap! ❤️ In the previous posts, we learned about fun…
  2. Sep 21, 2026🚀 Welcome back to our AI Engineer Roadmap! ❤️ In the previous post, we explored functions…
  3. Sep 20, 2026In the previous post, we learned how conditional statements allow Python programs to make…
  4. Sep 19, 2026In the previous post, we explored Python operators and even tested ourselves with some tri…
  5. Sep 18, 2026In the previous post, we learned how to convert one data type into another using Type Cast…
  6. Sep 17, 2026In the previous post, we learned how to take input from users and display output. One impo…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →