A simple solution
Use N discriminant
functions,
and pick the max.
This is guaranteed to
give consistent and
convex decision
regions if y is linear.