I have a data frame in which one of my columns is the target value and there are lots of ordinal categories in columns of data frame.

I want to encode these ordinal categories in columns with this method which is proposed here

I didn't understand what I should do. Should I find the probability of each category in each column and substitute the amount of probability with the string of each category?

  • 1
    $\begingroup$ @BenReiniger: Thanks for highlighting, got deviated from the main question by looking at the answer. $\endgroup$
    – Toros91
    May 24, 2019 at 3:20

1 Answer 1


The paper you've linked describes a method for predicting an ordinal dependent variable, but it sounds like you're looking for a way to use ordinal independent variables. That part makes up just the first part of the paper's method, and is relatively easier. It's somewhat analogous with one-hot encoding: you have indicators $x\leq \alpha$ for each level $\alpha$ (except the maximum one).

For example, if the levels are Low, Medium, High, your new variables will be "Low" and "Low or Medium" (skipping "Low or Medium or High" since that's always true).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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