GenericObjectEditor & dateAttributes range

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

GenericObjectEditor & dateAttributes range

ADLs
Hi all,
this a struggling PhD student trying to figure out what the legal
'dateAttributes' range is within the 'GenericObjectEditor' for converting a
dateFormat to numericAtrributes please.

See format below,

@RELATION ADLs

@ATTRIBUTE 'User-ID' REAL
@ATTRIBUTE 'Timestamp' DATE"yyyy-MM-ddHH:mm:ss"
@ATTRIBUTE 'Sensor-Bedroom' REAL
@ATTRIBUTE 'Sensor-Bathroom' REAL
@ATTRIBUTE 'Sensor-Sittingroom' REAL
@ATTRIBUTE 'Sensor-Kitchen' REAL
@ATTRIBUTE Fitbit REAL
@ATTRIBUTE 'class'
{Bedroom-Resting,Bedroom-Sleeping,Bathroom-Toilet,Bathroom-Shower/Bath,kitchen-prepare,kitchen-eat/drink,Sittingroom-Read,Sittingroom-WatchTV}

@DATA
2,"2018-04-10 23:44:50",0,1,0,0,0,Bathroom-Toilet

This format above in .arff will open in weka but the algorithms I need to
use HMM, Naive Bayes etc are greyed out as they want all datatypes in
numeric format.
I have converted the file to a .csv format and tried to open in weka,
clicked on the checkbox opening the  'GenericObjectEditor' GUI but now
cannot find a range that weka will accept in order to convert 'Timestamp' to
a numeric datatype so I can un-grey the much needed algorithms....any
assistance greatly appreciated :)



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

Re: GenericObjectEditor & dateAttributes range

Eibe Frank-3
There is the DateToNumeric filter:


You can then use the MathExpression filter to turn that from milliseconds expired since 1970 into some other quantity if that is more appropriate.

Cheers,
Eibe

On Sat, Aug 10, 2019 at 2:00 AM ADLs <[hidden email]> wrote:
Hi all,
this a struggling PhD student trying to figure out what the legal
'dateAttributes' range is within the 'GenericObjectEditor' for converting a
dateFormat to numericAtrributes please.

See format below,

@RELATION ADLs

@ATTRIBUTE 'User-ID' REAL
@ATTRIBUTE 'Timestamp' DATE"yyyy-MM-ddHH:mm:ss"
@ATTRIBUTE 'Sensor-Bedroom' REAL
@ATTRIBUTE 'Sensor-Bathroom' REAL
@ATTRIBUTE 'Sensor-Sittingroom' REAL
@ATTRIBUTE 'Sensor-Kitchen' REAL
@ATTRIBUTE Fitbit REAL
@ATTRIBUTE 'class'
{Bedroom-Resting,Bedroom-Sleeping,Bathroom-Toilet,Bathroom-Shower/Bath,kitchen-prepare,kitchen-eat/drink,Sittingroom-Read,Sittingroom-WatchTV}

@DATA
2,"2018-04-10 23:44:50",0,1,0,0,0,Bathroom-Toilet

This format above in .arff will open in weka but the algorithms I need to
use HMM, Naive Bayes etc are greyed out as they want all datatypes in
numeric format.
I have converted the file to a .csv format and tried to open in weka,
clicked on the checkbox opening theĀ  'GenericObjectEditor' GUI but now
cannot find a range that weka will accept in order to convert 'Timestamp' to
a numeric datatype so I can un-grey the much needed algorithms....any
assistance greatly appreciated :)



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

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

Re: GenericObjectEditor & dateAttributes range

ADLs
There is the DateToNumeric filter:

http://weka.sourceforge.net/doc.dev/weka/filters/unsupervised/attribute/DateToNumeric.html

You can then use the MathExpression filter to turn that from milliseconds
expired since 1970 into some other quantity if that is more appropriate.


....THANK YOU so much.... :) the filter worked....finally I can see the
algorithms !!



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