Make predict a method.