Orange Forum • View topic - Changes to date values

Changes to date values

General discussions about Orange and with Orange connected things (data mining, machine learning, bioinformatics...).

Changes to date values

Postby fbravo » Fri May 17, 2013 11:24

Hi there, I'm new to this and I'm completely puzzled with this :?:

I load a tab file containing date values (YYYYMMDD). Orange treats them as a continuous attribute but somehow, it changes some of them (all the odd ones). I use these values not for analysis but for reference and the changes invalidate those references. Examples of changed dates include:

20100909 it changes it to 20100908
20100911 to 20100910
20130421 to 20130420
20130423 to 20130422

But it does not change even numbers such as
20100910
20130422

I can easily solve it by converting it to string, but I want to prevent it happening in other data. Can someone explain why this happens?

Francisco

Re: Changes to date values

Postby Ales » Mon May 20, 2013 14:19

Orange uses 32 bit floats to store continuous values, and (for instance) 20100909 is not representable in that format (all integers between -16777216 and 16777216 are representable exactly, but after that rounding to the nearest representable value occurs).

So you should change to values to strings, or convert them to some other format (for instance days since the epoch).

Re: Changes to date values

Postby fbravo » Tue May 21, 2013 2:15

That certainly explains.
Thank you very much,
Francisco


Return to General Discussions



cron