public class HoltLinearModel extends MovAvgModel
Modifier and Type | Class and Description |
---|---|
static class |
HoltLinearModel.DoubleExpModelParser |
static class |
HoltLinearModel.HoltLinearModelBuilder |
MovAvgModel.AbstractModelParser
Modifier and Type | Field and Description |
---|---|
protected static ParseField |
NAME_FIELD |
static MovAvgModelStreams.Stream |
STREAM |
Constructor and Description |
---|
HoltLinearModel(double alpha,
double beta) |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeMinimized()
Returns if the model can be cost minimized.
|
MovAvgModel |
clone()
Clone the model, returning an exact copy
|
protected <T extends Number> |
doPredict(Collection<T> values,
int numPredictions)
Predicts the next `n` values in the series, using the smoothing model to generate new values.
|
MovAvgModel |
neighboringModel()
Generates a "neighboring" model, where one of the tunable parameters has been
randomly mutated within the allowed range.
|
<T extends Number> |
next(Collection<T> values)
Returns the next value in the series, according to the underlying smoothing model
|
<T extends Number> |
next(Collection<T> values,
int numForecasts)
Calculate a Holt-Linear (doubly exponential weighted) moving average
|
void |
writeTo(StreamOutput out)
Write the model to the output stream
|
emptyPredictions, hasValue, minimizeByDefault, predict
protected static final ParseField NAME_FIELD
public static final MovAvgModelStreams.Stream STREAM
public boolean canBeMinimized()
MovAvgModel
canBeMinimized
in class MovAvgModel
public MovAvgModel neighboringModel()
MovAvgModel
neighboringModel
in class MovAvgModel
public MovAvgModel clone()
MovAvgModel
clone
in class MovAvgModel
protected <T extends Number> double[] doPredict(Collection<T> values, int numPredictions)
doPredict
in class MovAvgModel
T
- Type of numericvalues
- Collection of numerics to movingAvg, usually windowednumPredictions
- Number of newly generated predictions to returnpublic <T extends Number> double next(Collection<T> values)
MovAvgModel
next
in class MovAvgModel
T
- Type of numericvalues
- Collection of numerics to movingAvg, usually windowedpublic <T extends Number> double[] next(Collection<T> values, int numForecasts)
T
- Type T extending Numbervalues
- Collection of values to calculate avg fornumForecasts
- number of forecasts into the future to returnpublic void writeTo(StreamOutput out) throws IOException
MovAvgModel
writeTo
in class MovAvgModel
out
- Output streamIOException
Copyright © 2009–2016. All rights reserved.