tightened up prediction function: went from iterative to using built-in Octave per-element functionality.