public class LengthTimeLinearRegressionForecastStreamProcessor
extends io.siddhi.core.query.processor.stream.StreamProcessor<io.siddhi.core.util.snapshot.state.State>
Sample Query2 (time window, length window, nextX, calculation interval, confidence interval, y, x): from InputStream#timeseries:lengthTimeOutlier(20 min, 20, x+2, 2, 0.9, y, x) select * insert into OutputStream;
This class performs enables users to forecast future events using linear regression Number of data points could be constrained using both time and length windows.
| Constructor and Description |
|---|
LengthTimeLinearRegressionForecastStreamProcessor() |
| Modifier and Type | Method and Description |
|---|---|
io.siddhi.core.query.processor.ProcessingMode |
getProcessingMode() |
List<io.siddhi.query.api.definition.Attribute> |
getReturnAttributes() |
protected io.siddhi.core.util.snapshot.state.StateFactory<io.siddhi.core.util.snapshot.state.State> |
init(io.siddhi.core.event.stream.MetaStreamEvent metaStreamEvent,
io.siddhi.query.api.definition.AbstractDefinition abstractDefinition,
io.siddhi.core.executor.ExpressionExecutor[] expressionExecutors,
io.siddhi.core.util.config.ConfigReader configReader,
io.siddhi.core.event.stream.holder.StreamEventClonerHolder streamEventClonerHolder,
boolean b,
boolean b1,
io.siddhi.core.config.SiddhiQueryContext siddhiQueryContext)
The init method of the LinearRegressionOutlierStreamProcessor.
|
protected void |
process(io.siddhi.core.event.ComplexEventChunk<io.siddhi.core.event.stream.StreamEvent> streamEventChunk,
io.siddhi.core.query.processor.Processor nextProcessor,
io.siddhi.core.event.stream.StreamEventCloner streamEventCloner,
io.siddhi.core.event.stream.populater.ComplexEventPopulater complexEventPopulater,
io.siddhi.core.util.snapshot.state.State state)
The main processing method that will be called upon event arrival.
|
void |
start()
This will be called only once and this can be used to acquire required resources for the
processing element.
|
void |
stop()
This will be called only once and this can be used to release the acquired resources
for processing.
|
processEventChunkpublic LengthTimeLinearRegressionForecastStreamProcessor()
protected io.siddhi.core.util.snapshot.state.StateFactory<io.siddhi.core.util.snapshot.state.State> init(io.siddhi.core.event.stream.MetaStreamEvent metaStreamEvent,
io.siddhi.query.api.definition.AbstractDefinition abstractDefinition,
io.siddhi.core.executor.ExpressionExecutor[] expressionExecutors,
io.siddhi.core.util.config.ConfigReader configReader,
io.siddhi.core.event.stream.holder.StreamEventClonerHolder streamEventClonerHolder,
boolean b,
boolean b1,
io.siddhi.core.config.SiddhiQueryContext siddhiQueryContext)
init in class io.siddhi.core.query.processor.stream.AbstractStreamProcessor<io.siddhi.core.util.snapshot.state.State>abstractDefinition - the incoming stream definitionexpressionExecutors - the executors of each function parameterssiddhiQueryContext - siddhi query contextprotected void process(io.siddhi.core.event.ComplexEventChunk<io.siddhi.core.event.stream.StreamEvent> streamEventChunk,
io.siddhi.core.query.processor.Processor nextProcessor,
io.siddhi.core.event.stream.StreamEventCloner streamEventCloner,
io.siddhi.core.event.stream.populater.ComplexEventPopulater complexEventPopulater,
io.siddhi.core.util.snapshot.state.State state)
process in class io.siddhi.core.query.processor.stream.StreamProcessor<io.siddhi.core.util.snapshot.state.State>streamEventChunk - the event chunk that need to be processednextProcessor - the next processor to which the success events need to be passedstreamEventCloner - helps to clone the incoming event for local storage or
modificationcomplexEventPopulater - helps to populate the events with the resultant attributespublic void start()
public void stop()
public List<io.siddhi.query.api.definition.Attribute> getReturnAttributes()
getReturnAttributes in class io.siddhi.core.query.processor.stream.AbstractStreamProcessor<io.siddhi.core.util.snapshot.state.State>public io.siddhi.core.query.processor.ProcessingMode getProcessingMode()
getProcessingMode in class io.siddhi.core.query.processor.stream.AbstractStreamProcessor<io.siddhi.core.util.snapshot.state.State>Copyright © 2019 WSO2. All rights reserved.