Class LinearModel

    • Constructor Detail

      • LinearModel

        public LinearModel()
      • LinearModel

        public LinearModel​(StreamInput in)
        Read from a stream.
    • Method Detail

      • getWriteableName

        public String getWriteableName()
        Description copied from interface: NamedWriteable
        Returns the name of the writeable object
      • canBeMinimized

        public boolean canBeMinimized()
        Description copied from class: MovAvgModel
        Returns if the model can be cost minimized. Not all models have parameters which can be tuned / optimized.
        Specified by:
        canBeMinimized in class MovAvgModel
      • neighboringModel

        public MovAvgModel neighboringModel()
        Description copied from class: MovAvgModel
        Generates a "neighboring" model, where one of the tunable parameters has been randomly mutated within the allowed range. Used for minimization
        Specified by:
        neighboringModel in class MovAvgModel
      • doPredict

        protected double[] doPredict​(Collection<Double> values,
                                     int numPredictions)
        Description copied from class: MovAvgModel
        Calls to the model-specific implementation which actually generates the predictions
        Specified by:
        doPredict in class MovAvgModel
        Parameters:
        values - Collection of numerics to movingAvg, usually windowed
        numPredictions - Number of newly generated predictions to return
        Returns:
        Returns an array of doubles, since most smoothing methods operate on floating points
      • next

        public double next​(Collection<Double> values)
        Description copied from class: MovAvgModel
        Returns the next value in the series, according to the underlying smoothing model
        Specified by:
        next in class MovAvgModel
        Parameters:
        values - Collection of numerics to movingAvg, usually windowed
        Returns:
        Returns a double, since most smoothing methods operate on floating points