In this series we bring new Data Scientist Interview Questions. You can read other tutorials related to same topic on our website.
What is Cross Validation?
Cross-Validation in Machine Learning is a statistical resampling technique that uses different parts of the dataset to train and test a machine learning algorithm on different iterations. The aim of crossvalidation is to test the model’s ability to predict a new set of data that was not used to train the model.
Cross-validations avoids them overfitting of data. K-Fold Cross Validation is the most popular resampling technique that divides the whole dataset into K sets of equal sizes.
What are the different methods to split a tree in a decision tree algorithm?
Variance: Splitting the nodes of a decision tree using the variance is done when the target variable is continuous.
Information Gain: Splitting the nodes of a decision tree using Information Gain is preferred when the target variable is categorical.
Gini Impurity: Splitting the nodes of a decision tree using Gini Impurity is followed when the target variable is categorical.
How does the Support Vector Machine algorithm handle self-learning?
The SVM algorithm has a learning rate and expansion rate which takes care of self-learning.
The learning rate compensates or penalizes the hyperplanes for making all the incorrect moves while the expansion rate handles finding the maximum separation area between different classes.
What is the difference between Lasso and Ridge regression?
Lasso(also known as L1) and Ridge(also known as L2) regression are two popular regularization techniques that are used to avoid overfitting of data. These methods are used to penalize the coefficients to find the optimum solution and reduce complexity.
The Lasso regression works by penalizing the sum of the absolute values of the coefficients. In Ridge or L2 regression, the penalty function is determined by the sum of the squares of the coefficients.
What are the assumptions you need to take before starting with linear regression?
There are primarily 5 assumptions for a Linear Regression model:
- Multivariate normality: Multivariate normality is the assumption in statistics that the joint distribution of multiple variables follows a multivariate normal distribution. It implies that observations across variables have a symmetric, bell-shaped distribution. This assumption is crucial for accurate parameter estimation in multivariate analyses like linear regression and factor analysis.
- No auto-correlation: No autocorrelation means that the residuals or errors in a time series analysis are not systematically related across consecutive observations. It implies that the independence of errors is maintained, ensuring that the value of the error term for one observation does not predict the error term for the next observation.
- Homoscedasticity: Homoscedasticity refers to the assumption in regression analysis that the variance of the residuals or errors remains constant across all levels of the independent variable. In simpler terms, it implies that the spread or dispersion of residuals should be consistent along the range of predicted values, ensuring reliability in model predictions.
- Linear relationship: The relationship between the independent variables (predictors) and the dependent variable should be linear. This means that changes in the independent variables are associated with constant changes in the dependent variable.
- No or little multicollinearity: There should be little or no multicollinearity among the independent variables. Multicollinearity occurs when two or more independent variables in the regression model are highly correlated, making it difficult to isolate the individual effect of each variable.