lib/tealeaves/exponential_smoothing_forecast.rb
# Returns the mean squared error of the forecast.
Returns the mean squared error of the forecast.
Returns the mean squared error of the forecast .
def mean_squared_error
      return @mean_squared_error if @mean_squared_error
      numerator = errors.drop(@seasonality_strategy.start_index).map {|i| i ** 2 }.inject(&:+)
      @mean_squared_error = numerator / (errors.size - @seasonality_strategy.start_index).to_f
    end
def mean_squared_error return @mean_squared_error if @mean_squared_error numerator = errors . drop ( @seasonality_strategy . start_index ) . map { | i | i ** 2 } . inject ( & :+ ) @mean_squared_error = numerator / ( errors . size - @seasonality_strategy . start_index ) . to_f end
Returns the mean squared error of the forecast.
Returns the mean squared error of the forecast .