class_docstr: Factorization Machine (aka FM).
  
  This class implements L2-regularized arbitrary order FM model with logistic
  loss and gradient-based optimization.
  
  Only binary classification with 0/1 labels supported.
  
  See TFFMBaseModel and TFFMCore docs for details about parameters.
code: def fit(
      self,
      X,
      y,
      sample_weight=None,
      pos_class_weight=None,
      n_epochs=None,
      show_progress=False,
  ):
      # preprocess Y: suppose input {0, 1}, but internally will use {-1, 1} labels instead
      if not (set(y) == set([0, 1])):
          raise ValueError("Input labels must be in set {0,1}.")
      used_y = y * 2 - 1
      if sample_weight is not None:
          self.sample_weight = sample_weight
      if pos_class_weight is not None:
          self.pos_class_weight = pos_class_weight
      used_w = self._preprocess_sample_weights(
          self.sample_weight, self.pos_class_weight, used_y
      )
      self._fit(
          X_=X,
          y_=used_y,
          w_=used_w,
          n_epochs=n_epochs,
          show_progress=show_progress,
      )
  
file_path: tffm/tffm/models.py
imports: import numpy
  from .base import TFFMBaseModel
  from .utils import loss_logistic, loss_mse, sigmoid
label_desc: Use image node_id 3 for calling the TFFMClassifier obj's underlying member method code with example usage: obj.fit(X, y, sample_weight, pos_class_weight, n_epochs, show_progress) without return types