0
$\begingroup$

I am planning to use data for a clustering problem that contains a column with a binary value BUY/SELL.

Should I be converting this attribute and assign it binary values (BUY=1, SELL=0), and keep it on the same column, thus reducing the number dimensions

OR

Hot encode the attribute (adding two columns BUY and SELL and putting 1 on the appropriate column)?

How do these two methods of nominal to numeric conversion affect the final model for popular clustering algorithms (K means, Hierarchical, etc...)

$\endgroup$
0
$\begingroup$

Not much of difference in your case. The difference is in just 1 dimension which does not affect much. The only point I can add is that if the number of BUY and SELL values are not the same, you can replace them with their frequencies i.e. if 40% BUY and 60% SELL, then replace BUY with 0.4 and SELL with 0.6

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.