Added predict function, and prediction examples