Performance Tuning
Performance Tuning
Topic 2: Regularization
Topic 1: R-Squared and Adjusted
R-Squared:
These are performance metrics that show how much of the
output variation is explained by a LR model
Variation in Response
(accumulated wealth)
Possible responses
(age)
Coefficient of Determination: R-Squared - R2
•
Issues with R-squared
•
dftotal=
• LR: R2 = 1-SSres/SStot •
• R2 Always increases as more regressors
are added.
• R2 is biased estimate
• R2 Does not penalize non-significant terms
• R2 Is always positive
• R2 is not suitable for statistical test of
significance of weights
Topic 2: Regularization methods
REGULARIZATION: PROCESS OF MAKING THE LEARNING
MODEL SIMPLER
Regularization with Validation
Example: Cost of House
Regressors:
1. Floor Area
2. No of bedrooms
3. No of balconies
4. Type of locality No. Regressors
Minimize { }
Forcing
Minimize { }
Forcing,
w2
• L2 leads to near zero coefficients
w2
w1
Recap
•
Recap
Ridge regression employ L2 regularization by adding “sum of
squares of weights” to OLS, with weight factor λ
L2 regularization cannot eliminate any regressor but can
appropriately shrink insignificant ones
Ridge regression handles multiple correlated features by
diminishing or enhancing them simultaneously, instead
eliminating all but one (as in L1)
Elastic Net regularization employs a mix of L1 and L2 with
their own weighting factors to create a balanced model
Balance is a sense of harmony….