class_docstr: The ClassicalTextExplainer for returning explanations for n-gram
  bag-of-words models using sklearn's classifier API.
  Also serves as extensible wrapper with components built to support addition
  of fresh explainers using certain parts of this class.
class_docstr_tok: ["The","ClassicalTextExplainer","for","returning","explanations","for","n-gram","bag-of-words","models","using","sklearn","'s","classifier","API",".","Also","serves","as","extensible","wrapper","with","components","built","to","support","addition","of","fresh","explainers","using","certain","parts","of","this","class","."]
docstr: Encode text strings in X_str as vectors.
  :param X_str: Strings to be encoded.
  :type X_str: array_like (array of strings, ndarray, pandas dataframe)
  :return: A model explanation object. It is guaranteed to be a LocalExplanation.
  :rtype: array_like (ndarray, pandas dataframe). Same rows as X_str
docstr_tok: ["Encode","text","strings","in","X_str","as","vectors",".",":","param","X_str",":","Strings","to","be","encoded",".",":","type","X_str",":","array_like","(","array","of","strings",",","ndarray",",","pandas","dataframe",")",":","return",":","A","model","explanation","object",".","It","is","guaranteed","to","be","a","LocalExplanation",".",":","rtype",":","array_like","(","ndarray",",","pandas","dataframe",")",".","Same","rows","as","X_str"]
code: def _encode(self, X_str):
      """Encode text strings in X_str as vectors.
      :param X_str: Strings to be encoded.
      :type X_str: array_like (array of strings, ndarray, pandas dataframe)
      :return: A model explanation object. It is guaranteed to be a LocalExplanation.
      :rtype: array_like (ndarray, pandas dataframe). Same rows as X_str
      """
      X_vec, _ = self.preprocessor.encode_features(X_str)
      return X_vec
  
file_path: interpret-text/python/interpret_text/experimental/classical.py
imports: import numpy
  from sklearn.model_selection import GridSearchCV
  from sklearn.linear_model import LogisticRegression
  from sklearn.pipeline import Pipeline
  from interpret_text.experimental.common.base_explainer import _validate_X
  from interpret_text.experimental.common.utils_classical import BOWEncoder
  from interpret_text.experimental.common.constants import ExplainerParams
  from interpret_text.experimental.explanation import _create_local_explanation
label_desc: Use image node_id 2 for calling the ClassicalTextExplainer obj's underlying member method code with example usage: obj._encode(X_str) and returns: X_vec