TGViewer
Data Science & Machine Learning Data Science & Machine Learning @datasciencefun · 77.8K subscribers
Post #3899 5.3K
✅ Top Data Science Interview Questions with Answers: Part-3 🧠

21. Difference between PCA and LDA
• PCA (Principal Component Analysis):
Unsupervised technique that reduces dimensionality by maximizing variance. It doesn’t consider class labels.
• LDA (Linear Discriminant Analysis):
Supervised technique that reduces dimensionality by maximizing class separability using labeled data.

22. What is Logistic Regression?
A classification algorithm used to predict the probability of a binary outcome (0 or 1).
It uses the sigmoid function to map outputs between 0–1. Commonly used in spam detection, churn prediction, etc.

23. What is Linear Regression?
A supervised learning method that models the relationship between a dependent variable and one or more independent variables using a straight line (Y = a + bX + e). It's widely used for forecasting and trend analysis.

24. What are assumptions of Linear Regression?
• Linearity between independent and dependent variables
• No multicollinearity among predictors
• Homoscedasticity (equal variance of residuals)
• Residuals are normally distributed
• No autocorrelation in residuals

25. What is R-squared and Adjusted R-squared?
• R-squared: Proportion of variance in the dependent variable explained by the model
• Adjusted R-squared: Adjusts R-squared for the number of predictors, preventing overfitting in models with many variables

26. What are Residuals?
The difference between the observed value and the predicted value.
Residual = Actual − Predicted. They indicate model accuracy and should ideally be randomly distributed.

27. What is Regularization (L1 vs L2)?
Regularization prevents overfitting by penalizing large coefficients:
• L1 (Lasso): Adds absolute values of coefficients; can eliminate irrelevant features
• L2 (Ridge): Adds squared values of coefficients; shrinks them but rarely to zero

28. What is k-Nearest Neighbors (KNN)?
A lazy, non-parametric algorithm used for classification and regression. It assigns a label based on the majority of the k closest data points using a distance metric like Euclidean.

29. What is k-Means Clustering?
An unsupervised algorithm that groups data into k clusters. It assigns points to the nearest centroid and recalculates centroids iteratively until convergence.

30. Difference between Classification and Regression?
• Classification: Predicts discrete categories (e.g., Yes/No, Cat/Dog)
• Regression: Predicts continuous values (e.g., temperature, price)

💬 Double Tap ❤️ For Part-4!
  • ❤ 15
More from @datasciencefun
  1. Oct 17, 2026𝗜𝗕𝗠 𝗙𝗥𝗘𝗘 𝗧𝗘𝗖𝗛 𝗖𝗢𝗨𝗥𝗦𝗘𝗦 𝟮𝟬𝟮𝟲! 🎓 Explore IBM Cognitive Class and build…
  2. Oct 16, 2026𝗗𝗮𝘁𝗮 𝘀𝗰𝗶𝗲𝗻𝗰𝗲 𝗖𝗲𝗿𝘁𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻 𝗪𝗶𝘁𝗵 𝗔𝗜😍 Future Ready Data Scien…
  3. Oct 15, 2026Post #4665
  4. Oct 15, 2026Post #4664
  5. Oct 15, 2026Post #4663
  6. Oct 15, 2026Post #4662
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 →