Evaluate the risk for $\hat f_\tau$ using the bias-variance decomposition.

63 Views Asked by At

Consider a nonparametric regression model $y_i=f(x_i)+\epsilon_i, i=1,...n$, where $f:[0,1]\rightarrow\mathbb R$ is some unknown function, $\{x_i, i=1,...n\}\subset[0,1]$ are known deterministic points and $\epsilon_i\overset{iid}{\sim}N(0,\sigma^2)$. We want to estimate $f$ with a stump, a function of the form $f_{\tau, \beta}(x)=\beta_11\{x<\tau\}+\beta_21\{x>\tau\}$. Define the estimator as $\hat f_\tau:=f_{\tau, \hat \beta}$ where $\hat \beta:=\underset {\beta\in\mathbb R^2}{\operatorname {argmin}}\displaystyle \sum_{i=1}^n (y_i-f_{\tau,\beta}(x_i))^2$. Consider the loss function $\displaystyle L(f, \hat f_\tau):=\Vert f-\hat f_\tau\Vert^2_{L^2}:=\int_0^1 (f(x)-\hat f_\tau(x))^2 dx$, so that the risk $R(f, \hat f_\tau)=EL(f,\hat f_\tau)$ is the integrated mean square error.

Evaluate the risk for $\hat f_\tau$ using the bias-variance decomposition.

Work: The bias variance decomposition is $R(f, \hat f_\tau)=EL(f,\hat f_\tau)=\displaystyle E\int_0^1(f(x)-\hat{f}_\tau (x))^2 dx=\int_0^1 (f(x)-E\hat {f}_\tau (x))^2 dx + \int_0^1 E(\hat{f}_\tau (x) - E\hat {f}_\tau(x))^2 dx$. An observation is that $\hat \beta$ is $\beta_{OLS}$, ordinary least squares. So I'm trying to solve for $\hat \beta$ :

$\hat \beta:=\underset {\beta\in\mathbb R^2}{\operatorname {argmin}}\displaystyle \sum_{i=1}^n (y_i-f_{\tau,\beta}(x_i))^2=\underset {\beta\in\mathbb R^2}{\operatorname {argmin}}\displaystyle \sum_{i=1}^n (y_i-\beta_11\{x_i<\tau\}-\beta_21\{1>\tau\})^2$

$\frac{d}{d\beta_1}\displaystyle \sum_{i=1}^n (y_i-\beta_11\{x_i<\tau\}-\beta_21\{1>\tau\})^2=\displaystyle \sum_{i=1}^n 2(y_i-\beta_11\{x_i<\tau\}-\beta_21\{1>\tau\})(-1\{x_i<\tau\})=0$

$\frac{d}{d\beta_2}\displaystyle \sum_{i=1}^n (y_i-\beta_11\{x_i<\tau\}-\beta_21\{1>\tau\})^2=\displaystyle \sum_{i=1}^n 2(y_i-\beta_11\{x_i<\tau\}-\beta_21\{1>\tau\})(-1\{x_i>\tau\})=0$

Is this is the right approach? Is it possible to solve for $\beta_1, \beta_2$ in the two equations above?

Update:

I solved for $\hat \beta_1=\displaystyle \frac{\sum y_i1\{x_i<\tau\}}{\sum1\{x_i<\tau\}}, \hat \beta_2=\frac{\sum y_i 1\{x>\tau\}}{\sum1\{x_i>\tau\}}$

I now need to calculate $E\hat f_\tau(x)=E(\displaystyle \frac{\sum y_i1\{x_i<\tau\}}{\sum1\{x_i<\tau\}}1\{x<\tau\}+\frac{\sum y_i 1\{x>\tau\}}{\sum1\{x_i>\tau\}}1\{x>\tau\})$. Well for one I'm not sure what the random variable is here.