class_docstr: Introspective Rationale Explainer
      
class_docstr_tok: ["Introspective","Rationale","Explainer"]
docstr: Set the classifier from prepackaged option or provide custom classifier
  
  :param classifier_type: One of ['BERT', 'RNN', 'BERT_RNN']
  :type: str
  :param classifier: Custom provided classifier
  :type: Any
code: def set_classifier(
      self, classifier_type=CLASSIFIER_TYPE_RNN, classifier=None
  ):
      """Set the classifier from prepackaged option or provide custom classifier
  
      :param classifier_type: One of ['BERT', 'RNN', 'BERT_RNN']
      :type: str
      :param classifier: Custom provided classifier
      :type: Any
      """
      if (
          classifier_type == CLASSIFIER_TYPE_RNN
          or classifier_type == CLASSIFIER_TYPE_BERT_RNN
      ):
          self.classifier = ClassifierModule(
              self.model_config, self.preprocessor.word_vocab
          )
      elif classifier_type == CLASSIFIER_TYPE_BERT:
          self.classifier = (
              BertForSequenceClassification.from_pretrained(
                  "bert-base-uncased",
                  num_labels=self.model_config.num_labels,
                  output_hidden_states=False,
                  output_attentions=False,
              )
          )
      else:
          self.classifier = classifier
  
imports: from typing import Iterable, Any, Optional, Union, Dict
  import numpy
  import pandas
  import torch
  from interpret_text.experimental.common.base_explainer import BaseTextExplainer, _validate_X
  from interpret_text.experimental.common.constants import BertTokens
  from interpret_text.experimental.common.model_config.introspective_rationale_model_config import IntrospectiveRationaleModelConfig
  from interpret_text.experimental.common.model_config.model_config_constants import get_bert_default_config, get_rnn_default_config, get_bert_rnn_default_config
  from interpret_text.experimental.common.preprocessor.bert_preprocessor import BertPreprocessor
  from interpret_text.experimental.common.preprocessor.glove_preprocessor import GlovePreprocessor
  from interpret_text.experimental.common.utils_classical import plot_local_imp
  from interpret_text.experimental.common.utils_introspective_rationale import generate_data
  from interpret_text.experimental.explanation import _create_local_explanation, LocalExplanation
  from interpret_text.experimental.introspective_rationale.components import ClassifierWrapper, ClassifierModule, IntrospectionGeneratorModule
  from interpret_text.experimental.introspective_rationale.model import IntrospectiveRationaleModel
  from transformers import BertForSequenceClassification
label_desc: Use image node_id 4 for calling the IntrospectiveRationaleExplainer obj's underlying member method code with example usage: obj.set_classifier(classifier_type, classifier) without return types