NamedWriteable, Writeable, ToXContent, ToXContentFragmentpublic class EwmaModel extends MovAvgModel
| Modifier and Type | Class | Description |
|---|---|---|
static class |
EwmaModel.EWMAModelBuilder |
MovAvgModel.AbstractModelParserToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsWriteable.Reader<V>, Writeable.Writer<V>| Modifier and Type | Field | Description |
|---|---|---|
static double |
DEFAULT_ALPHA |
|
static java.lang.String |
NAME |
|
static MovAvgModel.AbstractModelParser |
PARSER |
EMPTY_PARAMS| Constructor | Description |
|---|---|
EwmaModel() |
|
EwmaModel(double alpha) |
|
EwmaModel(StreamInput in) |
Read from a stream.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
canBeMinimized() |
Returns if the model can be cost minimized.
|
MovAvgModel |
clone() |
Clone the model, returning an exact copy
|
protected <T extends java.lang.Number> |
doPredict(java.util.Collection<T> values,
int numPredictions) |
Calls to the model-specific implementation which actually generates the predictions
|
boolean |
equals(java.lang.Object obj) |
|
java.lang.String |
getWriteableName() |
Returns the name of the writeable object
|
int |
hashCode() |
|
MovAvgModel |
neighboringModel() |
Generates a "neighboring" model, where one of the tunable parameters has been
randomly mutated within the allowed range.
|
<T extends java.lang.Number> |
next(java.util.Collection<T> values) |
Returns the next value in the series, according to the underlying smoothing model
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
|
void |
writeTo(StreamOutput out) |
Write the model to the output stream
|
emptyPredictions, hasValue, minimizeByDefault, predictfinalize, getClass, notify, notifyAll, toString, wait, wait, waitisFragmentpublic static final java.lang.String NAME
public static final double DEFAULT_ALPHA
public static final MovAvgModel.AbstractModelParser PARSER
public EwmaModel()
public EwmaModel(double alpha)
public EwmaModel(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
MovAvgModelwriteTo in interface WriteablewriteTo in class MovAvgModelout - Output streamjava.io.IOExceptionpublic java.lang.String getWriteableName()
NamedWriteablepublic boolean canBeMinimized()
MovAvgModelcanBeMinimized in class MovAvgModelpublic MovAvgModel neighboringModel()
MovAvgModelneighboringModel in class MovAvgModelpublic MovAvgModel clone()
MovAvgModelclone in class MovAvgModelprotected <T extends java.lang.Number> double[] doPredict(java.util.Collection<T> values,
int numPredictions)
MovAvgModeldoPredict in class MovAvgModelT - Type of numericvalues - Collection of numerics to movingAvg, usually windowednumPredictions - Number of newly generated predictions to returnpublic <T extends java.lang.Number> double next(java.util.Collection<T> values)
MovAvgModelnext in class MovAvgModelT - Type of numericvalues - Collection of numerics to movingAvg, usually windowedpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOExceptionpublic int hashCode()
hashCode in class MovAvgModelpublic boolean equals(java.lang.Object obj)
equals in class MovAvgModel