This could return round(predictScore(...)) instead of duplicating it. Or if you wanted to optimize this method, really the condition reduces to "if (margin >= 0) 1 else 0" :)