class_docstr: Instantiate a fastText classifier that is compatible with :py:class:`CleanLearning <cleanlab.classification.CleanLearning>`.
  
  Parameters
  ----------
  train_data_fn: str
      File name of the training data in the format compatible with fastText.
  
  test_data_fn: str, optional
      File name of the test data in the format compatible with fastText.
class_docstr_tok: ["Instantiate","a","fastText","classifier","that","is","compatible","with",":","py",":","class",":","`","CleanLearning","<","cleanlab.classification.CleanLearning",">","`",".","Parameters","--","--","--","--","--","train_data_fn",":","str","File","name","of","the","training","data","in","the","format","compatible","with","fastText",".","test_data_fn",":","str",",","optional","File","name","of","the","test","data","in","the","format","compatible","with","fastText","."]
docstr: Produces a probability matrix with examples on rows and
  classes on columns, where each row sums to 1 and captures the
  probability of the example belonging to each class.
docstr_tok: ["Produces","a","probability","matrix","with","examples","on","rows","and","classes","on","columns",",","where","each","row","sums","to","1","and","captures","the","probability","of","the","example","belonging","to","each","class","."]
code: def predict_proba(self, X=None, train_data=True, return_labels=False):
      """Produces a probability matrix with examples on rows and
      classes on columns, where each row sums to 1 and captures the
      probability of the example belonging to each class."""
  
      fn = self.train_data_fn if train_data else self.test_data_fn
      pred_probs_list = []
      if return_labels:
          labels_list = []
      for labels, text in data_loader(
          fn=fn, indices=X, batch_size=self.batch_size
      ):
          pred = self.clf.predict(
              text=text, k=len(self.clf.get_labels())
          )
          # Get p(label = k | x) matrix of shape (N x K) of pred probs for each x
          pred_probs = [
              [p for _, p in sorted(list(zip(*l)), key=lambda x: x[0])]
              for l in list(zip(*pred))
          ]
          pred_probs_list.append(np.array(pred_probs))
          if return_labels:
              labels_list.append(labels)
      pred_probs = np.concatenate(pred_probs_list, axis=0)
      if return_labels:
          gold_labels = [
              self.label2num[z] for l in labels_list for z in l
          ]
          return (pred_probs, np.array(gold_labels))
      else:
          return pred_probs
  
file_path: cleanlab/cleanlab/models/fasttext.py
imports: import time
  import os
  import copy
  import numpy
  from sklearn.base import BaseEstimator
  from fasttext import train_supervised, load_model
label_desc: Use image node_id 6 for calling the FastTextClassifier obj's underlying member method code with example usage: obj.predict_proba(X, train_data, return_labels) and returns: pred_probs,  np, pred_probs