base class for classifier