private static void validateParams(double alpha, double beta) {
        if (alpha < 0 || alpha > 1) {
            throw new RuntimeException("The value of alpha must be between 0 and 1");
        }

        if (beta < 0 || beta > 1) {
            throw new RuntimeException("The value of beta must be between 0 and 1");
        }
    }
Performs double exponential smoothing for given time series.
This method is suitable for fitting series with linear trend.

@param data  An array containing the recorded data of the time series
@param alpha Smoothing factor for data (0 &lt; alpha &lt; 1)
@param beta  Smoothing factor for trend (0 &lt; beta &lt; 1)

@return Instance of model that can be used to forecast future values
src/main/java/eu/hansolo/tilesfx/tools/DoubleExponentialSmoothingForLinearSeries.java