implement discriminant model