class_docstr: Mixin abstract base class defining functionality for classifiers.
class_docstr_tok: ["Mixin","abstract","base","class","defining","functionality","for","classifiers","."]
docstr: Set the number of output classes.
code: def nb_classes(self, nb_classes: int):
      """
      Set the number of output classes.
      """
      if nb_classes is None or nb_classes < 2:
          raise ValueError(
              "nb_classes must be greater than or equal to 2."
          )
  
      self._nb_classes = nb_classes
  
imports: from abc import ABC, ABCMeta, abstractmethod
  from typing import List, Optional, Union
  import numpy
  from art.estimators.estimator import BaseEstimator, NeuralNetworkMixin, LossGradientsMixin, DecisionTreeMixin
label_desc: Use image node_id 3 for calling the ClassifierMixin obj's underlying member method code with example usage: obj.nb_classes(nb_classes) without return types