4
$\begingroup$

v[![][1]

I am confused about how to preprocess range based category such as age, tumor-size & inv-nodes. Should I take an average of the limits, as in - 14.5, 24.5 and so on or do one hot encoding of the co-domain range. Taking one hot encoding would increase the no. of features significantly. Because, each attribute has co-domain as following:

  1. age: 10-19, 20-29, 30-39, 40-49, 50-59, 60-69, 70-79, 80-89, 90-99.
  2. tumor-size: 0-4, 5-9, 10-14, 15-19, 20-24, 25-29, 30-34, 35-39, 40-44, 45-49, 50-54, 55-59.
  3. inv-nodes: 0-2, 3-5, 6-8, 9-11, 12-14, 15-17, 18-20, 21-23, 24-26, 27-29, 30-32, 33-35, 36-39.
$\endgroup$
  • 1
    $\begingroup$ Mean should be fine here. OHE should be used when you have no clue on different values. Here we have the numbers. $\endgroup$ – 10xAI May 21 at 19:51
1
$\begingroup$

You should definitely not use one hot encoding with values which represent numbers, as this removes the natural order between your intervals.

So these values should be represented as numbers:

  • Either with the average of the limits indeed
  • Or a simple integer encoding of the intervals, e.g. tumor sizes 0-4, 5-9, 10-14,... would be represented as 0,1,2,...
| 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.