Packages

class ExpSmoothing extends Forecaster

The ExpSmoothing class provide very basic time series analysis capabilities of Exponential Smoothing models. ExpSmoothing models are often used for forecasting. Given time series data stored in vector 'y', its next value 'y_t = y(t)' may be predicted based on prior/smoothed values of 'y':

y_t = s_t-1 + α (s_t-1 - s_t-2)

where vector 's' is the smoothed version of vector 'y' and 'α in [0, 1]' is the smoothing parameter. Trend and seasonality can be factored into the model with two additional smoothing parameters 'β' and 'γ', respectively.

Linear Supertypes
Forecaster, Error, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ExpSmoothing
  2. Forecaster
  3. Error
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ExpSmoothing(y_: VectoD, ll: Int = 1, multiplicative: Boolean = false, validateSteps: Int = 1)

    y_

    the input vector (time series data)

    ll

    seasonal period

    multiplicative

    whether to use multiplicative seasonality or not if false, use additive seasonality

    validateSteps

    number of steps ahead within-sample forecast sse to minimize

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. def diagnose(yy: VectoD, ee: VectoD): Unit

    Compute diagostics for the Exponential Smoothing model.

    Compute diagostics for the Exponential Smoothing model.

    yy

    the response vector

    ee

    the residual/error vector

    Definition Classes
    ExpSmoothingForecaster
  7. var e: VectoD
    Attributes
    protected
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def eval(): Unit

    Compute the error and useful diagnostics for the entire dataset.

    Compute the error and useful diagnostics for the entire dataset.

    Definition Classes
    ExpSmoothingForecaster
  11. def f_(z: Double): String

    Format a double value.

    Format a double value.

    z

    the double value to format

    Definition Classes
    Forecaster
  12. def f_obj(input: VectoD): Double

    The objective function to be minimized (sum of squared errors).

    The objective function to be minimized (sum of squared errors).

    input

    the input vector of 'α', 'β' and 'γ' to be optimized

  13. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def fit: VectorD

    Return the quality of fit including 'rSquared'.

    Return the quality of fit including 'rSquared'. Not providing 'rBarSq'.

    Definition Classes
    ExpSmoothingForecaster
  15. def fitLabel: Seq[String]

    Return the labels for the fit.

    Return the labels for the fit.

    Definition Classes
    ExpSmoothingForecaster
  16. def fitMap: Map[String, String]

    Build a map of quality of fit measures (use of LinedHashMap makes it ordered).

    Build a map of quality of fit measures (use of LinedHashMap makes it ordered). Override to add more quality of fit measures.

    Definition Classes
    Forecaster
  17. final def flaw(method: String, message: String): Unit
    Definition Classes
    Error
  18. def forecast(h: Int = 1, t: Int = n-1): VectoD

    Forecast 'h'-steps ahead based on data up to time 't'.

    Forecast 'h'-steps ahead based on data up to time 't'.

    h

    the step size

    t

    the time point to start the forecast

  19. def forecast(h: Int): VectoD

    Produce n-steps-ahead forecast for ARIMA models.

    Produce n-steps-ahead forecast for ARIMA models.

    h

    the number of steps to forecast, must be at least one.

    Definition Classes
    ExpSmoothingForecaster
    See also

    ams.sunysb.edu/~zhu/ams586/Forecasting.pdf

  20. def forecast(): VectoD

    Produce forecasts for one step ahead into the future

    Produce forecasts for one step ahead into the future

    Definition Classes
    Forecaster
  21. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. val index_rSq: Int
    Definition Classes
    Forecaster
  24. def init(): Unit

    Compute initial values of 's', 'b', 'aa' and 'c'.

  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. val mae: Double
    Attributes
    protected
    Definition Classes
    Forecaster
  27. val mape: Double
    Attributes
    protected
    Definition Classes
    Forecaster
  28. val mse: Double
    Attributes
    protected
    Definition Classes
    Forecaster
  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. def predict(): VectoD

    Return the vector of fitted values on the training data.

    Return the vector of fitted values on the training data.

    Definition Classes
    ExpSmoothingForecaster
  33. val rSq: Double
    Attributes
    protected
    Definition Classes
    Forecaster
  34. val rmse: Double
    Attributes
    protected
    Definition Classes
    Forecaster
  35. def setTS(y_: VectoD): Unit

    Set/change the internal time series.

    Set/change the internal time series. May be used to set the time series to a different time window (typically future when new data become available) in order to produce newer forecast (typically with the new data) without re-training the model for parameters (use existing parameters from previous training).

    y_

    the new time series

  36. def smooth(input: VectoD = VectorD(α, β, γ)): VectoD

    Smooth the times series data.

    Smooth the times series data.

    input

    the input vector of 'α', 'β' and 'γ' to be optimized

  37. val sse: Double
    Attributes
    protected
    Definition Classes
    Forecaster
  38. val ssr: Double
    Attributes
    protected
    Definition Classes
    Forecaster
  39. val sst: Double
    Attributes
    protected
    Definition Classes
    Forecaster
  40. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  41. def toString(): String
    Definition Classes
    AnyRef → Any
  42. def train(): ExpSmoothing

    Train the ExpSmoothing model to times series data, by finding the value for the smoothing parameter 'α', 'β' and 'γ' that minimizes the sum of squared errors (sse).

    Train the ExpSmoothing model to times series data, by finding the value for the smoothing parameter 'α', 'β' and 'γ' that minimizes the sum of squared errors (sse).

    Definition Classes
    ExpSmoothingForecaster
  43. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Forecaster

Inherited from Error

Inherited from AnyRef

Inherited from Any

Ungrouped