lib/linefit.rb
############################################################################
# Return the sum of the squared errors
#
Return the sum of the squared errors
Return the sum of the squared errors
def sumSqErrors
      unless @sumSqErrors
         self.regress or return
         @sumSqErrors = @sumSqDevy - @sumSqDevx * @slope ** 2
         @sumSqErrors = 0 if @sumSqErrors < 0
      end
      return @sumSqErrors
   end
def sumSqErrors unless @sumSqErrors self . regress or return @sumSqErrors = @sumSqDevy - @sumSqDevx * @slope ** 2 @sumSqErrors = 0 if @sumSqErrors < 0 end return @sumSqErrors end
Return the sum of the squared errors
Return the sum of the squared errors