An efficient maximum entropy approach for categorical variable prediction