public abstract class MovAvgModel extends java.lang.Object implements NamedWriteable, ToXContent
Modifier and Type | Class and Description |
---|---|
static class |
MovAvgModel.AbstractModelParser
Abstract class which also provides some concrete parsing functionality.
|
Writeable.Reader<V>, Writeable.Writer<V>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY_PARAMS
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 java.lang.Number> |
doPredict(java.util.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
|
abstract boolean |
equals(java.lang.Object obj) |
abstract int |
hashCode() |
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 java.lang.Number> |
next(java.util.Collection<T> values)
Returns the next value in the series, according to the underlying smoothing model
|
<T extends java.lang.Number> |
predict(java.util.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
|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getWriteableName
isFragment, toXContent
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 java.lang.Number> double next(java.util.Collection<T> values)
T
- Type of numericvalues
- Collection of numerics to movingAvg, usually windowedpublic <T extends java.lang.Number> double[] predict(java.util.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 java.lang.Number> double[] doPredict(java.util.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 java.io.IOException
public abstract MovAvgModel clone()
clone
in class java.lang.Object
public abstract int hashCode()
hashCode
in class java.lang.Object
public abstract boolean equals(java.lang.Object obj)
equals
in class java.lang.Object