public abstract class LengthTimeRegressionCalculator extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
batchSize |
protected int |
calcInterval |
protected double |
confidenceInterval |
protected long |
currentEventTime |
protected long |
duration |
protected int |
eventCount |
protected Queue<Long> |
expiryTimeList |
protected int |
incCounter |
protected int |
xParameterCount |
Constructor and Description |
---|
LengthTimeRegressionCalculator(int paramCount,
long timeWindow,
int lengthWindow,
int calcInt,
double ci)
Constructor for LengthTimeRegressionCalculator.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addEvent(Object[] data,
long expiryTime)
Abstract method for accumulating events.
|
Object[] |
calculateLinearRegression(Object[] data,
long expiryTime)
Method which returns linear regression results.
|
protected abstract Object[] |
processData()
Abstract method for performing linear regression.
|
protected abstract void |
removeExpiredEvents()
Abstract method for removing events which have expired based on time and/or length.
|
protected long duration
protected int batchSize
protected int calcInterval
protected double confidenceInterval
protected int eventCount
protected int xParameterCount
protected int incCounter
protected long currentEventTime
public LengthTimeRegressionCalculator(int paramCount, long timeWindow, int lengthWindow, int calcInt, double ci)
paramCount
- Number of X variables + 1 (Y variable)timeWindow
- Time window which is used to constrain number of eventslengthWindow
- Length window which is used to constrain number of eventscalcInt
- Frequency of regression calculationci
- Confidence intervalprotected abstract void addEvent(Object[] data, long expiryTime)
data
- Array which holds Y and X valuesexpiryTime
- Time at which each event should expire (based on time window)protected abstract void removeExpiredEvents()
protected abstract Object[] processData()
public Object[] calculateLinearRegression(Object[] data, long expiryTime)
data
- Array which holds Y and X valuesexpiryTime
- Time at which each event should expire (based on time window)Copyright © 2019 WSO2. All rights reserved.