1. Mar 4, 2014

### zzmanzz

1. The problem statement, all variables and given/known data

Suppose I wish to fit a plane
$$z = w_1 + w_2x +w_3y$$
to a data set $$(x_1,y_1,z_1), ... ,(x_n,y_n,z_n)$$

2. Relevant equations

3. The attempt at a solution

I'm basically trying to figure out the 3-dimensional version of the example on wiki.
The objective function to e minimized is:

$$Q(w) = \sum_{i = 1}^n Q_i(w) = \sum_{i = 1}^n (w_1 + w_2x_i + w_3y_i - z_i)^2$$
I want to find the parameters of $$w_1,w_2,w_3$$

The iterative method updates the parameters $$w^{(0)}_1,w^{(0)}_2,w^{(0)}_3$$
1-step in the iteration
$$\left( \begin{array}{ccc} w^{(1)}_1 \\ w^{(1)}_2\\ w^{(1)}_3 \end{array} \right) = \left( \begin{array}{ccc} w^{(0)}_1 \\ w^{(0)}_2 \\ w^{(0)}_3 \end{array} \right) + \alpha \times \left( \begin{array}{ccc} 2(w^{(0)}_1 + w^{(0)}_2x_i + w^{(0)}_3 y_i - z_i) \\ 2x_i(w^{(0)}_1 + w^{(0)}_2x_i + w^{(0)}_3 y_i - z_i) \\ 2y_i(w^{(0)}_1+ w^{(0)}_2x_i + w^{(0)}_3 y_i - z_i) \end{array} \right)$$

[tex]\alpha [\tex] is the step size.

Last edited: Mar 5, 2014
2. Mar 8, 2014