MACHINE LEARNING
106403Unit 2: Statistical Decision Theory
Q1c. Ridge regression adds which term to the loss function? (i) L1 norm (ii) Entropy (iii) L2 norm (iv) Cross-entropy20252m
Unit 2: Statistical Decision Theory
View this question on its own page →Ridge regression adds which term to the loss function?
(i) L1 norm
(ii) Entropy
(iii) L2 norm
(iv) Cross-entropyWorked SolutionAnswer: (iii) L2 norm
Explanation:
Ridge Regression (Tikhonov regularization) adds L2 penalty to OLS loss:
where ,
- Shrinks coefficients toward zero, handles multicollinearity, reduces variance / overfitting.
- Closed form:
Contrast:
- L1 norm (i) → Lasso regression, induces sparsity/feature selection.
- Entropy (ii) / Cross-entropy (iv) → used in logistic regression / decision trees, not ridge.
So ridge = L2.
Q1d. Maximum Likelihood estimation finds (i) Prior probabilities (ii) Parameters that maximize data likelihood (iii) Decision boundaries (iv) Cluster centroids20252m
Unit 2: Statistical Decision Theory
View this question on its own page →Maximum Likelihood estimation finds
(i) Prior probabilities
(ii) Parameters that maximize data likelihood
(iii) Decision boundaries
(iv) Cluster centroidsWorked SolutionAnswer: (ii) Parameters that maximize data likelihood
Explanation:
Maximum Likelihood Estimation (MLE):
- Finds parameter values that make observed data most probable under assumed model.
- Example: For Gaussian, MLE gives sample mean and sample variance (biased) .
- Contrast MAP: includes prior.
It does NOT find priors (i), decision boundaries (iii) directly, or cluster centroids (iv) — those are consequences after estimation.
So (ii) is correct.
Q3(a). A company wants to predict the sales (y) of a product based on its advertising expenditure (x). The observed data for 5 months is: | x (Advertising) | y (Sales) | |-----------------|-----------| | 1 | 3 | | 2 | 4 | | 3 | 2 | | 4 | 5 | | 5 | 7 | Calculate the regression coefficients for the linear regression model: y = w_0 + w_1 x Then, predict the value of y when x = 6.20257m
Unit 2: Statistical Decision Theory
View this question on its own page →A company wants to predict the sales (y) of a product based on its advertising expenditure (x).
The observed data for 5 months is:x (Advertising) y (Sales) 1 3 2 4 3 2 4 5 5 7 Calculate the regression coefficients for the linear regression model:
Then, predict the value of y when x = 6.
Worked SolutionGiven: , ,
Compute (intercept), (slope) for via OLS.
Formulas: ,
1 3 -2 -1.2 2.4 4 2 4 -1 -0.2 0.2 1 3 2 0 -2.2 0 0 4 5 1 0.8 0.8 1 5 7 2 2.8 5.6 4 Sum numer , denom Model:
Prediction at :
Residuals check: , SSE small.
If using normal equations directly: gives same.
Q3b. Given a dataset with two features: X = [[2, 0], [0, 1], [0, 2]]. Compute the covariance matrix, eigenvalues, and the principal components.20257m
Unit 2: Statistical Decision Theory
View this question on its own page →Given a dataset with two features: X = [[2, 0], [0, 1], [0, 2]]. Compute the covariance matrix, eigenvalues, and the principal components.
Worked SolutionData: , ,
Step 1: Mean center.
Centered
Step 2: Covariance (unbiased; if divide by 3, mention both).
Hence:
- Unbiased ():
- Biased (): (scale by )
Step 3: Eigenvalues solve :
, (Unbiased)
For biased version: , (2/3 times).Explained variance: by PC1, by PC2.
Step 4: Eigenvectors (PCs):
For : normalized
For : orthogonal.Normalized PCs (unit): direction of max variance (roughly along diagonal), orthogonal.
Projection gives reduced 1D representation capturing variance. First PC is the principal component.