# Use only 2 classes for this example mask = y!=2 X,y = X[mask,:], y[mask]