# Categorizing training data for ordinal regression

I previously asked a question about categorizing sentiment (level of happiness) in sentences using Machine Learning and some user proposed using an ordinal regression to solve this problem. In the question, I stated that my training and my test data might include "neutral" or "N/A" sentences. For example:

• Positive sentiment: "Today is the best day of my life", "I am feeling good"
• Neutral or N/A sentiment: "I am doing okay", "My dog is 7 years old"
• Negative sentiment: "I hate my life and want to disappear", "I am a little sad"

I would like to know how I should categorize the sentences in my training data.

Should I use 1 for negative sentences, 2 for neutral and N/A sentences and 3 for positive sentences or is it possible to use -1 for negative sentences, 0 for neutral and N/A sentences and 1 for positive sentences. I have never used ordinal regression in the past and I am wondering if it is even possible to use negative or zero-valued groups/categories.

The latest option, if possible, might produce more "intuitive" predictions. For example, a prediction of 0.55 would indicated a generally positive sentiment and -0.2 might indicate a slightly negative sentiment.

## 1 Answer

If you are performing ordinal logistic regression, it does not matter which values you use. The algorithm is designed for ordinal values so it does not expect to work with the numbers on an interval scale. The only thing that matters about the values is their order. In R, the response data should be an ordered factor. It can have levels (-1,0,1), (0,1,2), ("Low","Medium","High") or anything else you want.