Categorical attribute

42 views
Skip to first unread message

zhuoc

unread,
Feb 4, 2013, 7:40:01 PM2/4/13
to 10-701-spri...@googlegroups.com
Hi,

The dataset I selected contained a lot of categorical attributes (e.g. occupation, marital status). I'm wondering if I can treat one categorical attribute as N (N is the number of choices for this attribute) new attributes, where each of them is binary meaning it is or isn't choice i. (i = 1,...,N) Will it work for both NB and knn?

Thanks,

Zhuo 

premkumar

unread,
Feb 4, 2013, 8:21:22 PM2/4/13
to 10-701-spri...@googlegroups.com
Hi,
Thats how I did and it worked. I suppose the categories are only for simpler representation of the data while the values they can take are in fact the true attributes.

Prem

Leila Wehbe

unread,
Feb 4, 2013, 8:46:03 PM2/4/13
to premkumar, 10-701-spri...@googlegroups.com
This might work but don't forget that the N attributes (for marital status for example) will be dependent (because you have only one of the attributes = 1 at once). This will reduce the performance of the naive bayes classifier.

We ask that there are at least 10 dimensions in the data, so you could disregard some of the categorical dimensions that have a high number of attributes if you want.

Leila



--
http://alex.smola.org/teaching/cmu2013-10-701 (course website)
http://www.youtube.com/playlist?list=PLZSO_6-bSqHQmMKwWVvYwKreGu4b4kMU9 (YouTube playlist)
---
You received this message because you are subscribed to the Google Groups "10-701 Spring 2013 CMU" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 10-701-spring-201...@googlegroups.com.
To post to this group, send email to 10-701-spri...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Reply all
Reply to author
Forward
0 new messages