Skip to main content

Simple Linear Questions and Answers

Q: What is a linear regression?

A: It is all about getting the best fit line that supports linearity. The relation between independent and dependent variables helps to form a  Straight Line.


Q: Assumptions of Linear regression?

A: a)The relation between independent and dependent variables that supports Linearity.

    b)Multicollinearity.The relation between one feature with other feature

    c)Homoscedasticity: It means the same distribution of error for all the independent variables.

   d)Hetrosedasticity: it is quite opposite to Homescedasticity.no Equal distribution of the errors.


Q: Regression problems evaluation metrics and which one we have to use?

A: In regression problems, we are having a different  type of evaluation metrics like RMSE,
MSE, MAE, etc. And now the question is which one we have to use?
for regression problems, we can use any metrics to calculate the score but in Compilation time we use MAE(mean absolute error), which saves execution time and memory space, etc So most of the people use this.

Q: OUTLIER treatment required for Linear regression?
A) Yes Removing Outliers will help to improve the score.

Q): if our feature not following any Gaussian Distribution what we have to do?

A) we have to use 1) Log Transformation or
                              2) Reciprocal Transformation or
                              3)Exponential Transformation or
                              4)Sqareroot Transformation 
you can choose any technique for your feature that falls in any of the standard distribution.

Q)Missing value treatment is required for Linear regression

A) Missing value treatment is required for all the models. fill missing values with (mean, mode, median)

Q) Advantages and disadvantages of  Linear Model
A)  
  1. It can handle overfitting using dimensionality reduction techniques and cross-validation and regularization.
  2. Linear regression performs exceptionally well for linearly separable data.
Disadvantages:
  1. Sometimes Lot of Feature Engineering Is required
  2. If the independent features are correlated it may affect performance
  3. It is often quite prone to noise and overfitting

Q) Linear regression require Feature scaling?

A) Yes it needs a feature scaling.

Q) Linear regression for Time-series analysis
A) yes you can use but the results not accurate.


Comments

Popular posts from this blog

Loss Functions | MSE | MAE | RMSE

            Performance Metrics The various metrics used to evaluate the results of the prediction are : Mean Squared Error(MSE) Mean Absolute error(MAE) Root-Mean-Squared-Error(RMSE) Adjusted R² Mean Squared Error: Mean Squared error is one of the most used metrics for regression tasks. MSE is simply the average of the squared difference between the target value and value predicted by the regression model.  As it squares the differences and  penalizes (punish)even a small error which leads to over-estimation of how bad the model is. It is preferred more than other metrics because it is differentiable and hence can be optimized better. in the above formulae, y=actual value and ( yhat) means predicted value by the model. RMSE(Root Mean Squared Error: This is the same as MSE (Mean Squared Error) but the root of the value is considered while determining the accuracy of the model. It is preferred more in some cases because the errors are first...

LSTM

                                                                                  LSTM  we will discuss now each and every stage with the help of the above diagram. State1:Memory View The memory view is responsible for remembering and forget the information based on the context of an input. (you didn't get it, wait now you will understand). In the above diagram, the memory view is the top line.   key points( Ct-1, X, +,  and Ct) . The input is an old memory, X is multiplication which forgets the useless information from the old memory, and " +"   addition lets merge all these things. when we multiply the old memory with '0' the old memory will "0" or if we multiply with vector "1" The old memory won't change. ( what ...

KNN Interview Questions

                           KNN interview questions 1) Which of the following distance metric can not be used in k-NN? A) Euclidean Distance B) Manhatten Distance c) Hamming Distance E) Minkowski Distance F) Jaccard Distance G) All the above Answer:- G All of these distance metric can be used as a distance metric for KNN 2)Knn is for regression or classification? Answer:- Knn is used for both classification and regression problems. 3) When we use Manhatten Distance? Answer:-Manhatten distance is used for continuous variables. 4) You have given the following 2 statements, find which of these options is/are true in case of k-NN? In the case of very large value of k , we may include points from other classes into the neighborhood, so it leads to overfitting. In case of too small value of k the algorithm is very sensitive to noise.(it will affect our model performance). Answer:-The above two points are answers. 5...