Improving predictions code and adding --optimize option

did you add a trailing whitespace here?