I understand your point of view of cancelling the class if you only have 1-2 people. If you are a small business owner and you think this is the best approach for financial reasons then that’s what you must do.
But on the other side, if you keep cancelling a class then you run into the danger of losing even those few who are coming in. I would also look into other factors as well. Is it the time of the day a bad time for the class, is the quality of the instructors the problem or maybe there is not much demand for this type of class. I think by answering these questions it might help you find the real issue of the problem and actually give you some ideas of how to increase the following for the class.