For a better predictive model, the categorical variable can be considered as a continuous variable only when the variable is ordinal in nature.