It turns out that the closed form linear regression solution of Y predicted with X with coeffs beta = (X
^tX)^-1X^tY is the same as the one that would be obtained by differentiating the sum of squared deviations with each parameter in beta and solving the system of linear equations...
courtesy
Rakesh Kumar
although lacking many of the statistical properties of regression.. the aforementioned method of computing the linear regression coefficients can be very easily optimized to minimize the function Sum ( i to N ) ( ( yi - xi ^T beta ) * f ( y ) ). where f( y ) can be a sort fo cuntion specifying how much importance to give to a point in the smaple. Many applicatons of regression may require f(y) to be say a step function of the absolute value of y or a postively biased sampler or a sampling proportiional to the absolute value or maybe a square of it.