author | title | documentclass |
---|---|---|
Wu Zhenyu (SA21006096) |
Homework 3 for Statistical Learning |
article |
If the basis function is constant, i.e.
Solve the regularized weighted least squares problem:
$$\min_\mathbf{w}\frac12\sum_{i = 1}^N r_i{(y_i - \mathbf{w} \cdot \mathbf{x}_i)}^2
- \frac\lambda2\lVert \mathbf{w}\rVert_2^2$$
where
$$\begin{aligned} \mathrm{d}\Big(\frac12\sum_{i = 1}^N r_i{(y_i - \mathbf{w} \cdot \mathbf{x}_i)}^2
- \frac\lambda2\lVert \mathbf{w}\rVert_2^2\Big) & = \mathrm{d}\mathbf{w}^\mathsf{T} \Big(\sum_{i = 1}^N r_i(\mathbf{w}^\mathsf{T}\mathbf{x}_i - y_i)\mathbf{x}_i
- \lambda\mathbf{w}\Big) = 0 \ \lambda\mathbf{w} + \sum_{i = 1}^N r_i\mathbf{x}_i\mathbf{x}i^\mathsf{T}\mathbf{w} & = \sum{i = 1}^N r_i y_i \mathbf{x}_i \ \mathbf{w} & = \Big(\lambda I
- \sum_{i = 1}^N r_i\mathbf{x}_i\mathbf{x}i^\mathsf{T}\Big)^{-1} \sum{i = 1}^N r_i y_i \mathbf{x}_i \end{aligned}$$
Randomly generate 100 datasets, each of which consists of 25 points that are
samples of