sse function

Sum of Squared Errors