TGViewer
Data Science & Machine Learning Data Science & Machine Learning @datasciencefun · 77.8K subscribers
Post #3829 5.7K
✅ ML Algorithms – Interview Questions & Answers 🤖🧠

1️⃣ What is Linear Regression used for?
To predict continuous values by fitting a line between input (X) and output (Y).
Example: Predicting house prices.

2️⃣ How does Logistic Regression work?
It uses the sigmoid function to output probabilities (0-1) for classification tasks.
Example: Email spam detection.

3️⃣ What is a Decision Tree?
A flowchart-like structure that splits data based on features to make predictions.

4️⃣ How does Random Forest improve accuracy?
It builds multiple decision trees and takes the majority vote or average.
Helps reduce overfitting.

5️⃣ What is SVM (Support Vector Machine)?
An algorithm that finds the optimal hyperplane to separate data into classes.
Great for high-dimensional spaces.

6️⃣ How does KNN classify a point?
By checking the 'K' nearest data points and assigning the most frequent class.
It's a lazy learner – no actual training.

7️⃣ What is K-Means Clustering?
An unsupervised method to group data into K clusters based on distance.

8️⃣ What is XGBoost?
An advanced boosting algorithm — fast, powerful, and used in Kaggle competitions.

9️⃣ Difference between Bagging & Boosting?
⦁ Bagging: Models run independently (e.g., Random Forest)
⦁ Boosting: Models learn sequentially (e.g., XGBoost)

🔟 When to use which algorithm?
⦁ Regression → Linear, Random Forest
⦁ Classification → Logistic, SVM, KNN
⦁ Unsupervised → K-Means, DBSCAN
⦁ Complex tasks → XGBoost, LightGBM

💬 Tap ❤️ if this helped you!
  • ❤ 23
  • 👍 2
More from @datasciencefun
  1. Oct 17, 2026Aggregate functions such as COUNT() generally cannot be used in WHERE. ✅ Correct: SELECT d…
  2. Oct 17, 2026🚀 Data Science Roadmap 2026 📍 Phase 3: SQL for Data Science 📖 Topic 7 — HAVING HAVING i…
  3. Oct 17, 2026𝗜𝗕𝗠 𝗙𝗥𝗘𝗘 𝗧𝗘𝗖𝗛 𝗖𝗢𝗨𝗥𝗦𝗘𝗦 𝟮𝟬𝟮𝟲! 🎓 Explore IBM Cognitive Class and build…
  4. Oct 16, 2026𝗗𝗮𝘁𝗮 𝘀𝗰𝗶𝗲𝗻𝗰𝗲 𝗖𝗲𝗿𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗪𝗶𝘁𝗵 𝗔𝗜😍 Future Ready Data Scien…
  5. Oct 15, 2026Post #4665
  6. Oct 15, 2026Post #4664
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 →