Question

In: Computer Science

(1) For linear regression with multiple variables, why do we need to do feature scaling? (2)...

(1) For linear regression with multiple variables, why do we need to do feature scaling?
(2) How does the learning rate alpha influence the gradient descent algorithm?

Solutions

Expert Solution

1.

Rescaling matters for algorithms that have constraints or penalties based on coefficient sizes or differences. This includes most machine learning and search algorithms.

The only other reason to rescale is to make the estimated coefficients easier to interpret. This makes the most sense when your independent variables have arbitrary scales in the first place. For example, if you regressed college graduation class rank on candidate SAT scores and high school GPAs, the raw coefficients would have little meaning. If you rescaled your independent variables, then the size of the coefficients is directly meaningful. If you rescaled to mean 0 and standard deviation 1, for example, a coefficient of -0.1 on SAT score would tell you someone with a one standard deviation better SAT score is predicted to have a 0.1 standard deviation lower class rank.

2.

alpha must be specified that controls how much the coefficients can change on each update.

coefficient = coefficient – (alpha * delta)

This process is repeated until the cost of the coefficients (cost) is 0.0 or close enough to zero to be good enough.

Please comment in case of doubts, please upvote the solution


Related Solutions

a) In a linear regression, why do we need to be concerned with the range of...
a) In a linear regression, why do we need to be concerned with the range of the independent (X) variable? (Provide an example) b) Explain the idea that correlation doesn’t imply causation (Provide and example)
1. A multiple linear regression model should not be used if: A The variables are all...
1. A multiple linear regression model should not be used if: A The variables are all statistically significant. B The coefficient of determination R2 is large. C Both of the above. D Neither of the above. 2. Consider a multiple linear regression model where the output variable is a company's revenue for different months, and the purpose is to investigate how the revenue depends upon the company's advertising budget. The input variables can be time-lagged so that the first input...
Explain why you choose multiple regression with dummy variables but not linear trend model and why...
Explain why you choose multiple regression with dummy variables but not linear trend model and why do you believe this technique is appropriate to forecast your data?
In a multiple linear regression how do we calculate the standard error of B2 ( we...
In a multiple linear regression how do we calculate the standard error of B2 ( we have two independent variables and a constant so we have B0 B1 and B2) how do we calculate the standard error of the three.
When we estimate a linear multiple regression model (including a linear simple regression model), it appears...
When we estimate a linear multiple regression model (including a linear simple regression model), it appears that the calculation of the coefficient of determination, R2, for this model can be accomplished by using the squared sample correlation coefficient between the original values and the predicted values of the dependent variable of this model. Is this statement true? If yes, why? If not, why not? Please use either matrix algebra or algebra to support your reasoning.
In multiple regression why do we include the intercept? What is the intercept's importance?
In multiple regression why do we include the intercept? What is the intercept's importance?
Estimate the multiple linear regression equation     for the given data    1              2        &n
Estimate the multiple linear regression equation     for the given data    1              2              3               4 10             1              2               3 12            18            24             30 Estimate the multiple linear regression equation y with overparenthesis on top equals b subscript 0 plus b subscript 1 x subscript 1 plus b subscript 2 x subscript 2 for the given data x subscript 1 1 2 3 4 x subscript 2 10 1 2 3 y 12 18 24 30
Assignment on Multiple Linear Regression The Excel file BankData shows the values of the following variables...
Assignment on Multiple Linear Regression The Excel file BankData shows the values of the following variables for randomly selected 93 employees of a bank. This real data set was used in a court lawsuit against discrimination. Let = starting monthly salary in dollars (SALARY), = years of schooling at the time of hire (EDUCAT), = number of months of previous work experience (EXPER), = number of months that the individual was hired (MONTHS), = dummy variable coded 1 for males...
Assignment on Multiple Linear Regression                                     &nb
Assignment on Multiple Linear Regression                                                                                          The Excel file BankData shows the values of the following variables for randomly selected 93 employees of a bank. This real data set was used in a court lawsuit against discrimination. Let = monthly salary in dollars (SALARY), = years of schooling at the time of hire (EDUCAT), = number of months of previous work experience (EXPER), = number of months that the individual was hired by the bank (MONTHS), = dummy variable...
Discuss the application of multiple linear regression
Discuss the application of multiple linear regression
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT