Data Science Interview Questions

mi-top

myMock Interview Service for Real Tech Jobs

Mock Interview Try out mock interview

Regression

1. What is logistic regression? Or State an example when you have used logistic regression recently?

Ans :- Logistic Regression often referred as logit model is a technique to predict the binary outcome from a linear combination of predictor variables. For example, if you want to predict whether a particular political leader will win the election or not. In this case, the outcome of prediction is binary i.e. 0 or 1 (Win/Lose). The predictor variables here would be the amount of money spent for election campaigning of a particular candidate, the amount of time spent in campaigning, etc.

 

2. What is Classification Modeling?

Ans :- Classification Models are employed when the observations have to be classified in categories and not predicted. Examples being Cancerous and Non-cancerous tumor (2 categories), Bus, Rail, Car, Carpool (>2 categories)

3. In order to come up with a Linear Regression output a minimum of how many obervations are required.

Ans:- a. 1, b. 2, c. 30, d. None . Correct Answer is b which is 2. Output of Linear Regression is in the form of equation of straight line which requires atleast 2 observations.

4. For a coefficient value of -0.65123 for an input variable cost.car what has to be the interpretation of Log(Carpool/Car) in a multinomial regression?

Ans:- First of all, the sign (+ve,-ve) indicates the impact of the input variable on the output mode. In this case, if there is a unit increase in the input variable i.e., cost.car, the Log(Carpool/Car) decreases by 0.65123

5. Explain the difference between L1 and L2 regularization?

Ans :-L2 regularization tends to spread error among all the terms, while L1 is more binary/sparse, with many variables either being assigned a 1 or 0 in weighting. L1 corresponds to setting a Laplacean prior on the terms, while L2 corresponds to a Gaussian prior.

Call Us