regarding nominal attributes

View: New views
4 Messages — Rating Filter:   Alert me  

regarding nominal attributes

by gaurav_kl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
I wanted to know whether the performance of Weka's classifiers is too affected if I keep my nominal attributes which has "integer" values as numeric only.Is it important to assign these attribute  values to  "nominal" type.

Thanks
Gaurav

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist@...
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

Re: regarding nominal attributes

by Peter Reutemann-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I wanted to know whether the performance of Weka's classifiers is too
> affected if I keep my nominal attributes which has "integer" values as
> numeric only.Is it important to assign these attribute  values to  "nominal"
> type.

If you don't specify a nominal attribute as such, you might end up
with unwanted results. For instance, how do you interprete a value of
3.4 (a classifier might use this numeric value to split on)? If
fractions of your attribute don't make any sense, leave it as nominal
attribute.

Cheers, Peter
--
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
http://www.cs.waikato.ac.nz/~fracpete/           Ph. +64 (7) 858-5174

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist@...
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

Re: regarding nominal attributes

by gaurav_kl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Will it affect if my "nominal" attribute has integer values only,no fractions.Actually,my code is putting data from Lists  directly into ARFF file.So,it's a bit tedious to specify the nominal attributes specifically for each dataset.
I am using the NaiveBayes,J48,IBk,MultiPerceptron and SMO classifiers.

Thanks
Gaurav
Peter Reutemann-3 wrote:
> I wanted to know whether the performance of Weka's classifiers is too
> affected if I keep my nominal attributes which has "integer" values as
> numeric only.Is it important to assign these attribute  values to  "nominal"
> type.

If you don't specify a nominal attribute as such, you might end up
with unwanted results. For instance, how do you interprete a value of
3.4 (a classifier might use this numeric value to split on)? If
fractions of your attribute don't make any sense, leave it as nominal
attribute.

Cheers, Peter
--
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
http://www.cs.waikato.ac.nz/~fracpete/           Ph. +64 (7) 858-5174

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist@list.scms.waikato.ac.nz
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

Re: regarding nominal attributes

by Peter Reutemann-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Please no top-posting, see mailing list etiquette why
(http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html).

> Will it affect if my "nominal" attribute has integer values only,no
> fractions.

Weka doesn't differentiate between integer and float, every number is
converted to a double and treated as such.

> Actually,my code is putting data from Lists  directly into ARFF
> file.So,it's a bit tedious to specify the nominal attributes specifically
> for each dataset.

Use the NumericToNominal filter (package
weka.filters.unsupervised.attribute ) to convert them to nominal
values. Or store your attributes as STRING attributes and then use the
StringToNominal filter (same package) to convert them.

[...]

Cheers, Peter
--
Peter Reutemann, Dept. of Computer Science, University of Waikato, NZ
http://www.cs.waikato.ac.nz/~fracpete/           Ph. +64 (7) 858-5174

_______________________________________________
Wekalist mailing list
Send posts to: Wekalist@...
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html