public static int imputeCat(Vec v) { if (v.isCategorical()) return v.mode(); return (int) Math.round(v.mean()); }