predict the category based on the calculated theta