public class WindowedLinearRegressionProcessor extends Object implements TimeSeriesProcessor<double[],Double,DoubleTimeSeries>
Constructor and Description |
---|
WindowedLinearRegressionProcessor()
Calculate the regression from the same time series inputed
|
WindowedLinearRegressionProcessor(DoubleTimeSeries yearFirstHalf,
int i) |
WindowedLinearRegressionProcessor(DoubleTimeSeries yearFirstHalf,
int windowsize,
int offset) |
WindowedLinearRegressionProcessor(int windowsize)
Perform regression s.t.
|
WindowedLinearRegressionProcessor(int windowsize,
int offset)
Perform regression s.t.
|
WindowedLinearRegressionProcessor(LinearRegression reg)
Use reg as the linear regression to predict.
|
Modifier and Type | Method and Description |
---|---|
LinearRegression |
getRegression() |
void |
holdreg(boolean regdefined) |
void |
process(DoubleTimeSeries series) |
public WindowedLinearRegressionProcessor()
public WindowedLinearRegressionProcessor(int windowsize)
windowsize
- public WindowedLinearRegressionProcessor(int windowsize, int offset)
windowsize
- offset
- public WindowedLinearRegressionProcessor(LinearRegression reg)
process(DoubleTimeSeries)
function simply calls
LinearRegression.predict(Matrix)
with the times in the series as
inputreg
- public WindowedLinearRegressionProcessor(DoubleTimeSeries yearFirstHalf, int i)
public WindowedLinearRegressionProcessor(DoubleTimeSeries yearFirstHalf, int windowsize, int offset)
public void process(DoubleTimeSeries series)
process
in interface TimeSeriesProcessor<double[],Double,DoubleTimeSeries>
series
- alter this time series in placepublic void holdreg(boolean regdefined)
regdefined
- if true, process holds its last LinearRegression
public LinearRegression getRegression()
WindowedLinearRegressionProcessor
's underlying
LinearRegression
model