public abstract class MovAvgModel extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MovAvgModel.AbstractModelParser
Abstract class which also provides some concrete parsing functionality.
|
Constructor and Description |
---|
MovAvgModel() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
canBeMinimized()
Returns if the model can be cost minimized.
|
abstract MovAvgModel |
clone()
Clone the model, returning an exact copy
|
protected abstract <T extends Number> |
doPredict(Collection<T> values,
int numPredictions)
Calls to the model-specific implementation which actually generates the predictions
|
protected double[] |
emptyPredictions(int numPredictions)
Returns an empty set of predictions, filled with NaNs
|
boolean |
hasValue(int valuesAvailable)
Checks to see this model can produce a new value, without actually running the algo.
|
boolean |
minimizeByDefault()
Should this model be fit to the data via a cost minimizing algorithm by default?
|
abstract MovAvgModel |
neighboringModel()
Generates a "neighboring" model, where one of the tunable parameters has been
randomly mutated within the allowed range.
|
abstract <T extends Number> |
next(Collection<T> values)
Returns the next value in the series, according to the underlying smoothing model
|
<T extends Number> |
predict(Collection<T> values,
int numPredictions)
Predicts the next `n` values in the series.
|
abstract void |
writeTo(StreamOutput out)
Write the model to the output stream
|
public boolean minimizeByDefault()
public abstract boolean canBeMinimized()
public abstract MovAvgModel neighboringModel()
public boolean hasValue(int valuesAvailable)
valuesAvailable
- Number of values in the current window of valuespublic abstract <T extends Number> double next(Collection<T> values)
T
- Type of numericvalues
- Collection of numerics to movingAvg, usually windowedpublic <T extends Number> double[] predict(Collection<T> values, int numPredictions)
T
- Type of numericvalues
- Collection of numerics to movingAvg, usually windowednumPredictions
- Number of newly generated predictions to returnprotected abstract <T extends Number> double[] doPredict(Collection<T> values, int numPredictions)
T
- Type of numericvalues
- Collection of numerics to movingAvg, usually windowednumPredictions
- Number of newly generated predictions to returnprotected double[] emptyPredictions(int numPredictions)
numPredictions
- Number of empty predictions to generatepublic abstract void writeTo(StreamOutput out) throws IOException
out
- Output streamIOException
public abstract MovAvgModel clone()
Copyright © 2009–2017. All rights reserved.