predict_samples function

Computes prediction for a each sample.