Hi,

After researching on how to handle seasonality in regression, I have the
following findings.

1. Can use dummy variables to capture seasonality. The user needs to add
dummy variables to the input stream to capture and quantify seasonality in
the regression equation. Therefore, this does not have to be explicitly
implemented since it will be a user input to the generic regression
function.
           eg:- If there is a quarterly pattern, user 3 dummy variables to
denote the 4 quarters. (dummy variables are binary variables)

2. If seasonality is continuous (i.e. not discrete) for example sinusoidal
or quadratic or exponential, then the regression equation ceases to be
linear and we need to identify the functional form that fits the data set.
Then using that functional form, the user needs to convert it to linear
form, prior to sending the data set to the generic regression function.
           eg:- if the dataset is of the form, y ~ Sin(x), then we need to
create a new variable x1 = sin(x) so that we can fit the linear regression
equation y = a + b * x1

Once again, we don't have to implement anything in the regression function,
since this adjustment needs to take place before the data set is sent to
the regression function.

3. This brings us to the next point and the golden question: how does a
user identify which functional form the dataset fits? Usually, we need to
employ some sort of algorithm to fit a non-linear regression equation like
Gauss-Newton or a graphing mechanism, which unfortunately is out of the
scope of the CEP.

*Next Steps*

So considering the above findinds, here are the next steps.

1. Create Samples for the following
     a) Plain old linear regression (simple and multivariate)
     b) Linear regression with dummy variables
     c) Linear regression on non-linear dataset, using siddhi queries to
transform functional form to linear prior to sending data to regression
function.

2. Document the above samples and complete function documentation

3. If and when we come across datasets that follow certain non-linear
functional forms, create simple math functions in siddhi to convert data.
eg:- Sin(x), power(x,n) etc;

Thats the update as of now. Any thoughts? suggestions?


Regards,
Seshika
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to