class_docstr: An abstact base class for sklearn classifier adapters for fasttext.
  
  Parameters
  ----------
  **kwargs
      Keyword arguments will be redirected to fasttext.train_supervised.
class_docstr_tok: ["An","abstact","base","class","for","sklearn","classifier","adapters","for","fasttext",".","Parameters","--","--","--","--","--","*","*","kwargs","Keyword","arguments","will","be","redirected","to","fasttext.train_supervised","."]
docstr: Predict class probabilities for X, an array of strings.
  
  This is mainly meant to enable easy use of fitted classifier objects
  with the lime ML interpretability package.
  
  Parameters
  ----------
  X : array-like of shape = [n_sammples]
      The input samples, each one a string object.
  
  Returns
  -------
  p : array of shape = [n_samples, n_classes]
      The class probabilities of the input samples. The order of the
      classes corresponds to that in the attribute classes_.
  
  Example
  -------
  >>> data = [['woof', 0],['meow meow', 1]]
  >>> import pandas as pd;
  >>> df = pd.DataFrame(data=data, columns=['txt', 'lbl'])
  >>> from skift import FirstColFtClassifier;
  >>> clf = FirstColFtClassifier(lr=0.3, epoch=10)
  >>> clf.fit(df[['txt']], df['lbl']);
  FirstColFtClassifier(epoch=10, lr=0.3)
  >>> clf.predict([['meow meow meow']])
  array([1])
  >>> from lime.lime_text import LimeTextExplainer;
  >>> explainer = LimeTextExplainer(bow=False)
  >>> exp = explainer.explain_instance(
  ...     'meow', classifier_fn=clf.predict_proba_on_str_arr);
docstr_tok: ["Predict","class","probabilities","for","X",",","an","array","of","strings",".","This","is","mainly","meant","to","enable","easy","use","of","fitted","classifier","objects","with","the","lime","ML","interpretability","package",".","Parameters","--","--","--","--","--","X",":","array-like","of","shape","=","[","n_sammples","]","The","input","samples",",","each","one","a","string","object",".","Returns","--","--","--","-","p",":","array","of","shape","=","[","n_samples",",","n_classes","]","The","class","probabilities","of","the","input","samples",".","The","order","of","the","classes","corresponds","to","that","in","the","attribute","classes_",".","Example","--","--","--","-",">",">",">","data","=","[","[","'woof","'",",","0","]",",","[","'meow","meow","'",",","1","]","]",">",">",">","import","pandas","as","pd",";",">",">",">","df","=","pd.DataFrame","(","data=data",",","columns=","[","'txt","'",",","'lbl","'","]",")",">",">",">","from","skift","import","FirstColFtClassifier",";",">",">",">","clf","=","FirstColFtClassifier","(","lr=0.3",",","epoch=10",")",">",">",">","clf.fit","(","df","[","[","'txt","'","]","]",",","df","[","'lbl","'","]",")",";","FirstColFtClassifier","(","epoch=10",",","lr=0.3",")",">",">",">","clf.predict","(","[","[","'meow","meow","meow","'","]","]",")","array","(","[","1","]",")",">",">",">","from","lime.lime_text","import","LimeTextExplainer",";",">",">",">","explainer","=","LimeTextExplainer","(","bow=False",")",">",">",">","exp","=","explainer.explain_instance","(","...","'meow","'",",","classifier_fn=clf.predict_proba_on_str_arr",")",";"]
code: def predict_proba_on_str_arr(self, X):
      """Predict class probabilities for X, an array of strings.
  
      This is mainly meant to enable easy use of fitted classifier objects
      with the lime ML interpretability package.
  
      Parameters
      ----------
      X : array-like of shape = [n_sammples]
          The input samples, each one a string object.
  
      Returns
      -------
      p : array of shape = [n_samples, n_classes]
          The class probabilities of the input samples. The order of the
          classes corresponds to that in the attribute classes_.
  
      Example
      -------
      >>> data = [['woof', 0],['meow meow', 1]]
      >>> import pandas as pd;
      >>> df = pd.DataFrame(data=data, columns=['txt', 'lbl'])
      >>> from skift import FirstColFtClassifier;
      >>> clf = FirstColFtClassifier(lr=0.3, epoch=10)
      >>> clf.fit(df[['txt']], df['lbl']);
      FirstColFtClassifier(epoch=10, lr=0.3)
      >>> clf.predict([['meow meow meow']])
      array([1])
      >>> from lime.lime_text import LimeTextExplainer;
      >>> explainer = LimeTextExplainer(bow=False)
      >>> exp = explainer.explain_instance(
      ...     'meow', classifier_fn=clf.predict_proba_on_str_arr);
      """
      return np.array(
          [
              self._format_probas(res)
              for res in self._predict_on_str_arr(
                  X, k=self.num_classes_
              )
          ],
          dtype=np.float_,
      )
  
imports: import os
  import abc
  import numpy
  from fasttext import train_supervised
  from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.utils.multiclass import unique_labels
  from sklearn.exceptions import NotFittedError
  from .util import temp_dataset_fpath, dump_xy_to_fasttext_format, python_fasttext_model_to_bytes, bytes_to_python_fasttext_model
label_desc: Use image node_id 16 for calling the FtClassifierABC obj's underlying member method code with example usage: obj.predict_proba_on_str_arr(X) and returns: np