It depends entirely on the situation and your failure to actually contextualize something tells me that you wouldn't support that determination no matter the real reasons.
I did contextualise it for you. You refuse to be drawn on an answer. That tells me what I need to know about you.
As for me, I find it very, very dangerous for the State to use the amount of circulating testosterone in an ex-offender as one of its yardsticks to determine likely recidivism, and then continue to hold the ex-offender indefinitely based on that information. When your freedom depends on a factor over which you have no control, the State should not use it against you.
If, holding everything else constant, an actuarial relationship between perceived race of ex-offender and recidivism rates was shown (for example, if, controlling for all other factors, black ex-offenders were more likely to re-offend than white ex-offenders), would you think race was a fair thing to use against ex-offenders as one of the factors in whether they are held indefinitely?
I wouldn't.