Type of data in Forecast

classic Classic list List threaded Threaded
7 messages Options
JC
Reply | Threaded
Open this post in threaded view
|

Type of data in Forecast

JC
Hi everyone!

I am starting to work with Forecast and I have a doubt. My dataset is the
following:

/@attribute 'ID Patient' numeric
@attribute 'Date' {'2019-04-11 11:09:23','2019-04-11 11:08:52','2019-04-02
11:17:15','2019-04-02 10:38:30'}
@attribute Temp numeric
@attribute 'SPO2 Min' numeric
@attribute 'SPO2 Max' numeric
@attribute 'BPM Min' numeric
@attribute 'BPM Max' numeric
@attribute 'BPM Avg' numeric
@attribute SYS numeric
@attribute DIA numeric
@attribute 'EDA Min' numeric
@attribute 'EDA Max' numeric
@attribute 'EDA Avg' numeric
@attribute 'Disease' {'IRA', 'ITU', 'PB'}/

So as you can see, my attribute Date is nominal.

I have a CSV to work with dataset too and Date is like this:
/
Date
13-Dec-2019 17:10:00
25-Dec-2019 16:54:00
24-Jan-2020 20:30:00
25-Jan-2020 18:44:00
29-Jan-2020 20:58:00
11-Feb-2020 17:33:00/
12-Feb-2020 16:00:00

So ... when I try to use in WEKA, the interface dont let me use this
parameter like timestamp. *So what should I do to use this attribute "Date"
in a forecast serie?

*Thanks in advance!



--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit
https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Type of data in Forecast

Anatoliy
Hi,

yes, I also have a similar problem with date format.

For example - when viewing a file (WEKA viewer), the date is displayed as
1949-01-01
but when displaying statistics
-662695200000.

This is a training sample airline.arff from the courses https://www.futurelearn.com/courses/advanced-data-mining-with-weka.

Thanks in advance!
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit
https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Type of data in Forecast

Peter Reutemann-3
On December 1, 2019 4:14:48 AM GMT+13:00, [hidden email] wrote:

>Hi,
>
>yes, I also have a similar problem with date format.
>
>For example - when viewing a file (WEKA viewer), the date is displayed
>as
>1949-01-01
>but when displaying statistics
>-662695200000.
>
>This is a training sample airline.arff from the courses
>https://www.futurelearn.com/courses/advanced-data-mining-with-weka.
>
>Thanks in advance!
>_______________________________________________
>Wekalist mailing list -- [hidden email]
>Send posts to: To unsubscribe send an email to
>[hidden email]
>To subscribe, unsubscribe, etc., visit
>https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
>List etiquette:
>http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

Date attributes are represented as doubles internally. Milli seconds since 1970.

Cheers, Peter
--
Peter Reutemann
Dept. of Computer Science
University of Waikato, NZ
+64 (7) 858-5174
http://www.cms.waikato.ac.nz/~fracpete/
http://www.data-mining.co.nz/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit
https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Type of data in Forecast

Peter Reutemann-3
In reply to this post by JC
On December 1, 2019 2:26:16 AM GMT+13:00, JC <[hidden email]> wrote:

>Hi everyone!
>
>I am starting to work with Forecast and I have a doubt. My dataset is
>the
>following:
>
>/@attribute 'ID Patient' numeric
>@attribute 'Date' {'2019-04-11 11:09:23','2019-04-11
>11:08:52','2019-04-02
>11:17:15','2019-04-02 10:38:30'}
>@attribute Temp numeric
>@attribute 'SPO2 Min' numeric
>@attribute 'SPO2 Max' numeric
>@attribute 'BPM Min' numeric
>@attribute 'BPM Max' numeric
>@attribute 'BPM Avg' numeric
>@attribute SYS numeric
>@attribute DIA numeric
>@attribute 'EDA Min' numeric
>@attribute 'EDA Max' numeric
>@attribute 'EDA Avg' numeric
>@attribute 'Disease' {'IRA', 'ITU', 'PB'}/
>
>So as you can see, my attribute Date is nominal.
>
>I have a CSV to work with dataset too and Date is like this:
>/
>Date
>13-Dec-2019 17:10:00
>25-Dec-2019 16:54:00
>24-Jan-2020 20:30:00
>25-Jan-2020 18:44:00
>29-Jan-2020 20:58:00
>11-Feb-2020 17:33:00/
>12-Feb-2020 16:00:00
>
>So ... when I try to use in WEKA, the interface dont let me use this
>parameter like timestamp. *So what should I do to use this attribute
>"Date"
>in a forecast serie?
>
>*Thanks in advance!
>
>
>
>--
>Sent from: https://weka.8497.n7.nabble.com/
>_______________________________________________
>Wekalist mailing list -- [hidden email]
>Send posts to: To unsubscribe send an email to
>[hidden email]
>To subscribe, unsubscribe, etc., visit
>https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
>List etiquette:
>http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

Change the header of your ARFF file, replacing the nominal attribute definition with the correct date one, using a text editor. See the following for more information on date format strings:

https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

Cheers, Peter
--
Peter Reutemann
Dept. of Computer Science
University of Waikato, NZ
+64 (7) 858-5174
http://www.cms.waikato.ac.nz/~fracpete/
http://www.data-mining.co.nz/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit
https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
JC
Reply | Threaded
Open this post in threaded view
|

Re: Type of data in Forecast

JC
Thank you Peter for your answer.
I /edited the arff file/ and now I have it in this way:

@relation datos_spidep2_IRA_ITU_PB

@attribute IDPatient numeric
@attribute Date DATE "dd-MM-yyyy HH:mm:ss"
@attribute Temp numeric
@attribute SPO2min numeric
@attribute SPO2max numeric
@attribute BPMmin numeric
@attribute BPMmax numeric
@attribute BPMavg numeric
@attribute Sys numeric
@attribute Dia numeric
@attribute EDAmin numeric
@attribute EDAmax numeric
@attribute EDAavg numeric
@attribute Disease {IRA,ITU,PB}

@data
1,'13-Dec-2019
17:10:00',34.27,95.5,98.02,69,74,71.42,141,91,4.67,4.94,4.78,IRA
1,'25-Dec-2019
16:54:00',34.22,96.45,100,69,73,71.76,159,85,1.31,1.39,1.36,IRA
1,'24-Jan-2020
20:30:00',35.1,94.26,99.68,64,68,66.88,171,86,1.73,1.82,1.78,IRA


But I am having some problems, when I try to load in WEKA I get the
following *error*:

/File '/x/file.arff' not recognised as an 'Arff data files' file.
Reason:
unparseable date: 13-Dec-2019 17:10:00, read Token[13-Dec-2019 17:10:00],
line 19/

Why is this happening?

Thanks in advance!



--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit
https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Type of data in Forecast

Peter Reutemann-3
On December 2, 2019 12:59:36 AM GMT+13:00, JC <[hidden email]> wrote:

>Thank you Peter for your answer.
>I /edited the arff file/ and now I have it in this way:
>
>@relation datos_spidep2_IRA_ITU_PB
>
>@attribute IDPatient numeric
>@attribute Date DATE "dd-MM-yyyy HH:mm:ss"
>@attribute Temp numeric
>@attribute SPO2min numeric
>@attribute SPO2max numeric
>@attribute BPMmin numeric
>@attribute BPMmax numeric
>@attribute BPMavg numeric
>@attribute Sys numeric
>@attribute Dia numeric
>@attribute EDAmin numeric
>@attribute EDAmax numeric
>@attribute EDAavg numeric
>@attribute Disease {IRA,ITU,PB}
>
>@data
>1,'13-Dec-2019
>17:10:00',34.27,95.5,98.02,69,74,71.42,141,91,4.67,4.94,4.78,IRA
>1,'25-Dec-2019
>16:54:00',34.22,96.45,100,69,73,71.76,159,85,1.31,1.39,1.36,IRA
>1,'24-Jan-2020
>20:30:00',35.1,94.26,99.68,64,68,66.88,171,86,1.73,1.82,1.78,IRA
>
>
>But I am having some problems, when I try to load in WEKA I get the
>following *error*:
>
>/File '/x/file.arff' not recognised as an 'Arff data files' file.
>Reason:
>unparseable date: 13-Dec-2019 17:10:00, read Token[13-Dec-2019
>17:10:00],
>line 19/
>
>Why is this happening?
>
>Thanks in advance!
>
>
>
>--
>Sent from: https://weka.8497.n7.nabble.com/
>_______________________________________________
>Wekalist mailing list -- [hidden email]
>Send posts to: To unsubscribe send an email to
>[hidden email]
>To subscribe, unsubscribe, etc., visit
>https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
>List etiquette:
>http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

If you read the documentation again, you will find that only when you use three or more "M" for the month it will get interpreted as text, which you clearly have ("Dec").

Cheers, Peter
--
Peter Reutemann
Dept. of Computer Science
University of Waikato, NZ
+64 (7) 858-5174
http://www.cms.waikato.ac.nz/~fracpete/
http://www.data-mining.co.nz/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit
https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|

Re: Type of data in Forecast

Anatoliy
In reply to this post by Peter Reutemann-3
Thanks, Peter.
I understood

regards

Anatoliy



--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
To subscribe, unsubscribe, etc., visit
https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html