✅ Data Science Interview Questions with Answers Part-7
61. How does linear regression work?
Linear regression models the relationship between input variables and a continuous target by fitting a line that minimizes the sum of squared errors between predicted and actual values. The coefficients represent how much the target changes when a feature changes.
62. Assumptions of linear regression?
Linear regression assumes a linear relationship between features and target, independence of errors, constant variance of errors, no multicollinearity among features, and normally distributed residuals for inference.
63. What is logistic regression?
Logistic regression is a classification algorithm that predicts probabilities for binary outcomes. It uses a sigmoid function to map linear combinations of features into values between zero and one.
64. What is decision tree?
A decision tree is a model that splits data into branches based on feature conditions. Each split aims to maximize information gain. Trees are easy to interpret but can overfit without constraints.
65. What is random forest?
Random forest is an ensemble of decision trees trained on different data samples and feature subsets. It reduces overfitting and improves accuracy by averaging predictions from multiple trees.
66. What is KNN and when do you use it?
K-nearest neighbors predicts outcomes based on the closest data points in feature space. It is simple and effective for small datasets but becomes slow and less effective with high dimensions.
67. What is SVM?
Support vector machine finds the optimal boundary that maximizes the margin between classes. It works well for high-dimensional data and complex decision boundaries.
68. How does Naive Bayes work?
Naive Bayes applies Bayes’ theorem assuming features are independent. Despite the assumption, it performs well in text classification and spam detection due to probability-based reasoning.
69. What are ensemble methods?
Ensemble methods combine multiple models to improve performance. Techniques like bagging, boosting, and stacking reduce errors by leveraging model diversity.
70. How do you tune hyperparameters?
Hyperparameters are tuned using techniques like grid search, random search, or Bayesian optimization. Cross-validation is used to select values that generalize well to unseen data.
Double Tap ♥️ For Part-8
Post #3991
4.6K
- ❤ 13
- 😁 4