lib/linefit.rb
############################################################################
# Return the predicted Y values
#
#  predictedYs = linefit.predictedYs
#
# The returned list is undefined if the regression fails.
#
Return the predicted Y values
predictedYs = linefit.predictedYs

The returned list is undefined if the regression fails.
Return the predicted Y values predictedYs = linefit . predictedYs The returned list is undefined if the regression fails .
def predictedYs
      unless @predictedYs
         self.regress or return
         @predictedYs = []
         0.upto(@numxy-1) do |i|
            @predictedYs[i] = @intercept + @slope * @x[i]
         end
      end
      return @predictedYs
   end
def predictedYs unless @predictedYs self . regress or return @predictedYs = [ ] 0 . upto ( @numxy - 1 ) do | i | @predictedYs [ i ] = @intercept + @slope * @x [ i ] end end return @predictedYs end
Return the predicted Y values
predictedYs = linefit.predictedYs
Return the predicted Y values predictedYs = linefit . predictedYs