Questions 2026 | Answers,
Rationales, Study Guide &
Interview Prep
, Updated Questions and Answers
100% Verified Exam Prep and Comprehensive
Rationales
Included
, Explain Logistic Regression and its assumptions. Logistic Regression is a go-to method for classification. Logistic regression models
the probability of the default class (e.g. the first class). It employs the use of the
sigmoid function that can take any real-valued number and map it into a probability
value between 0 and 1 to predict the output class. There are two types of logistic
regression: Binary and Multinomial. Binary Logistic Regression deals with two
categories whereas multinomial deals with three or more categories.
Assumptions:
Binary logistic regression requires the dependent variable to be binary. The
independent variables should be independent of each other. That is, the model
should have little or no multicollinearity, The independent variables should be
linearly related to the log odds.
Explain Linear Regression and its assumptions Linear regression is useful for finding the relationship between two continuous
variables. One is the predictor or independent variable and the other is the
response or dependent variable.
Assumptions
There are 5 basic assumptions of linear regression:
1. Linear relationship: Between the dependent and independent variable,
2. Multivariate normality: Multiple regression assumes that the residuals are
normally distributed.
3. No or little multicollinearity between the independent variables
4. No autocorrelation: It's a characteristic of data in which the correlation between
the values of the same variables is based on related objects. It violates the
assumption of instance independence, which underlies most of the conventional
models.
5. Homoscedasticity: This assumption means that the variance around the
regression line is the same for all values of the predictor variable.
How do you split your data between training and Training and validation set from data can be split on the following 2 principles. First,
validation? ensure the validation set is large enough to yield statistically meaningful results.
Second, the validation set should be representative of the data set as a whole. In
other words, don't pick a validation set with different characteristics than the training
set. An optimal way would be to use k-folds validation. This method makes multiple
splits of the dataset into train and validation sets. This offer various samples of data
and ultimately reduces the chances of overfitting.
Describe Binary Classification. Binary classification is the process of predicting the class of a given set of data
points. These classes are also known as targets/ labels. This method of predictive
modeling approximates a mapping function (f) from input variables (X) to discrete
output variables (y). For example, spam detection in email service providers can be
identified as a classification problem. This is binary classification since there are
only 2 classes: spam and not spam.
Explain the working of decision trees. A decision tree classification algorithm uses a training dataset to stratify or segment
the predictor space into multiple regions. Each such region has only a subset of the
training dataset. To predict the outcome for a given (test) observation, first, we
determine which of these regions it belongs to. Once its region is identified, its
outcome class is predicted as being the same as the mode (most common) of the
outcome classes of all the training observations that are included in that region. The
rules used to stratify the predictor space can be graphically described in a tree-like
flow-chart, hence the name of the algorithm. The only difference being that these
decision trees are drawn upside down.
Decision tree classification models can easily handle qualitative predictors without
the need to create dummy variables. Missing values are not a problem either.
Interestingly, decision tree algorithms are used for regression models as well. The
same library that you would use to build a classification model can also be used to
build a regression model after changing some of the parameters. However, one
major problem with decision trees is their high variance.