Pages: [1]
  Print  
Author Topic: Time series Labeling  (Read 1919 times)
drelum
Newbie
*
Posts: 3


« on: February 09, 2009, 08:59:40 PM »

Hello!

Does anyone know how I can generate a new binary attribute based on whether the next value in a time series stock price is UP or DOWN?

For example, If I have

time1: 50
time2: 60
time3: 40

Then, the generated attibute would be

time1: UP
time2: DOWN
time3: ?


Thank you in advance


Logged
haddock
Hero Member
*****
Posts: 853



WWW
« Reply #1 on: February 10, 2009, 10:57:47 AM »

Hi,

The operator LabelTrend2Classification does exactly this; but if your attribute is not the label you might need to designate it as such, using the ChangeAttributeRole operator, apply the LabelTrend2Classification operator, and then change back to the original label.

Actually there is also a ChangeAttributeType operator which appears to do the same as the ChangeAttributeRole, so two for the price of one!
Logged

Where is the wisdom we have lost in knowledge?
Where is the knowledge we have lost in information?

T.S.Eliot ~ Choruses from the Rock 1934
drelum
Newbie
*
Posts: 3


« Reply #2 on: February 10, 2009, 01:21:06 PM »

Hello Haddock,

Thank you for your response. I was wondering if there is a way to set a threshold, so the trend defition is set only if the change in values is above this threshold.

Do you know if this is possible?

Best Regards,

Andre
Logged
haddock
Hero Member
*****
Posts: 853



WWW
« Reply #3 on: February 10, 2009, 09:46:38 PM »

Hi,
Should tell you in the documentation.
Logged

Where is the wisdom we have lost in knowledge?
Where is the knowledge we have lost in information?

T.S.Eliot ~ Choruses from the Rock 1934
drelum
Newbie
*
Posts: 3


« Reply #4 on: February 11, 2009, 02:21:16 PM »

I could not find anything related to threshold definition in this operator.


Does anyone know how to do this?



Logged
Sebastian Land
Administrator
Hero Member
*****
Posts: 2426


« Reply #5 on: February 17, 2009, 11:11:03 PM »

Hi Andre,
did you already applied a windowing function onto your time series? Then you could use feature construction and a UserBasedDiscretization to fullfill your goal. Lets say you have something like that as an example

time-3  time-2  time-1 time-0
 30        40       45      52

You could then construct a new attribute difference using time-0  - time-1.
time-3  time-2  time-1 time-0 difference
 30        40       45      52        7

Using a UserBasedDiscretization you could wrap everything between -5 and 5 to stable and the rest onto down or up.

Greetings,
  Sebastian
Logged
Pages: [1]
  Print  
 
Jump to: