Linear Regression Flashcards
How to calculate error in single data point?
difference between actual value and predicted value
How to calculate Sum of Squared Errors (SSE)
(E1)2 + (E2)2+… + (En)2
What is the disadvantage of SSE
- Depend on number of data points
* Units hard to interpret
How to calculate Root mean squared errors?
sqrt(SSE/N)
How to calculate R squared ? ( another model)
- Compares the best model with baseline model
- Baseline model does not use any variables
- 1 - (SSE/SST) [SST = errors for baseline model)
What is the difference between multiple and adjusted R squared?
Multiple r squared increase when adding more variable but Adjusted r squared decrease.
What is t value in linear regression model?
- Estimate / Standard Error , larger this value good possibility to significant.
Why check correlation in model?
to identify correlated variables. remove these variables
calculate test set R squared
SSE = sum((tempPredict - test$Temp)^2)
SST = sum( (mean(train$Temp) - test$Temp)^2)
R2 = 1 - SSE/SST