class MoreMath::LinearRegression

def residuals

domain and image.
Returns the residuals of this linear regression in relation to the given
def residuals
  result = []
  @domain.zip(@image) do |x, y|
    result << y - (@a * x + @b)
  end
  result
end