Add support for passing factors list to predict.