docstr: The vocab size of the target feature.
  
  For regression (number) this is 1, for binary it is 2, and for category it is the vocab size.
docstr_tok: ["The","vocab","size","of","the","target","feature",".","For","regression","(","number",")","this","is","1",",","for","binary","it","is","2",",","and","for","category","it","is","the","vocab","size","."]
code: def vocab_size(self) -> int:
      """The vocab size of the target feature.
  
      For regression (number) this is 1, for binary it is 2, and for category it is the vocab size.
      """
      if self.is_category_target:
          return self.model.training_set_metadata[
              self.target_feature_name
          ]["vocab_size"]
      elif self.is_binary_target:
          return 2
      return 1
  
file_path: ludwig/ludwig/explain/explainer.py
imports: from abc import ABCMeta, abstractmethod
  import pandas
  from ludwig.api import LudwigModel
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import BINARY, CATEGORY, TYPE
  from ludwig.explain.explanation import Explanation, ExplanationsResult
  from ludwig.explain.util import prepare_data
label_desc: Use image node_id 4 for calling the Explainer obj's underlying member method code with example usage: obj.vocab_size() and returns: int, self, int