How would you feel if your child was sent to prison for something they may do in the future?

I recently read about a case where an individual received a criminal sentence partly based on the findings of an automated risk assessment tool. The tool predicted that the risk of him re-offending was high enough for the judge to increase his sentence.

The defendant has since challenged this verdict on the basis that it is completely unfair. For me, this is a very valid question: how fair is it to penalise someone (partially) for what they are likely to do in the future? 

Making such decisions based on a defendant's past actions is fair and logical. To do this based on what someone may go on to do, regardless of how likely this is calculated to be, does not sit well with me.

With that said, a fair argument could be that prevention is better than cure when it comes to criminality. I'm sure the aforementioned judge might argue that society should not have to suffer another one of this person's crimes before he acts.

I'm not sold. What do you think?