# Binary Encoding of Ordinal Categories

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?

• @BenReiniger: Thanks for highlighting, got deviated from the main question by looking at the answer. – Toros91 May 24 '19 at 3:20

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).