"How to do spreadsheet like time series calculations in Rapidminer ?"

AjAj Member Posts: 23  Maven
edited May 23 in Help
Hello,

I would like to calculate the following type of time series function using Rapidminer

A = A[n-1] + B[n-1]

where B[n-1] = f( A[N-1], C[N-1] ) , i.e function of A[N-1] and C[N-1]

In spreadsheet, one can do it by A[2] = A[1] + B[1] and extending it to the required number of cells.

How can I do it in Rapidminer?
First, I first tried "Generate Attribute" operator, by typing
A= A + B
i.e c language equivalent of  A += B
I was hoping that rapidminer will understand that I was referring to the previous value of A (I had taken care of the first value of "A" by initializing it using if condition.
But, I got a message mentioning something like A is not defined.

I then thought of implementing it by using "Windowing" operator. For this, I first loaded data from excel, then aligning A[2], A[1] and B[1] in one row by applying "Windowing" operator with
parameters set as
series representation -> examples
horizon -> 1
window size -> 2
step size -> 1

They all align, i.e A[2], A[1] and C[1] all align in one row, but A[2] does not contain right value. I cannot use "Generate Attributes" to modify A[2] value because A[2] is already generated. I am not able to use Set Data because the parameter "Value" of it can only be constant and not a variable ( I was willing to do a loop for each example row, even though it would be inefficient).

I tried to have access to the array index by generating an attribute index(id) using  "index series" element ( I renamed "index(id) to indexId, so that it does not conflict with "index(string, string)" function ). But, when I was using A[ index(id)] (tried square brackets and parentheses) in generate attribute, I am getting error message that "A" is not available.

I tried other Rapidminer elements relating to series and/or windowing. I either did not understand the documentation or find them relevant.

Could anyone please help me as to how I can implement a time series in Rapidminer, just like the way we can do it in spreadsheet using different cells.

Thanks,
Ajay
Tagged:
Sign In or Register to comment.