public class LengthTimeMultipleLinearRegression extends LengthTimeRegressionCalculator
batchSize, calcInterval, confidenceInterval, currentEventTime, duration, eventCount, incCounter, xParameterCount
Constructor and Description |
---|
LengthTimeMultipleLinearRegression(int paramCount,
long timeWindow,
int lengthWindow,
int calcInt,
double ci)
This method calls the constructor of super class.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addEvent(Object[] data,
long expiryTime)
Method to accumulate new events: dependent (Y) and independent (X) variable values.
|
protected Object[] |
processData()
Method which performs multiple linear regression.
|
protected void |
removeExpiredEvents()
Method to remove events which have expired based on time and/or length.
|
calculateLinearRegression
public LengthTimeMultipleLinearRegression(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 void addEvent(Object[] data, long expiryTime)
addEvent
in class LengthTimeRegressionCalculator
data
- Array which holds Y and X valuesexpiryTime
- Time at which each event should expire (based on time window)protected void removeExpiredEvents()
removeExpiredEvents
in class LengthTimeRegressionCalculator
protected Object[] processData()
processData
in class LengthTimeRegressionCalculator
Copyright © 2018 WSO2. All rights reserved.