docstr: Constructs the TensorRec graph and fits the model.
  :param interactions: scipy.sparse matrix, tensorflow.data.Dataset, str, or list
  A matrix of interactions of shape [n_users, n_items].
  If a Dataset, the Dataset must follow the format used in tensorrec.input_utils.
  If a str, the string must be the path to a TFRecord file.
  If a list, the list must contain scipy.sparse matrices, tensorflow.data.Datasets, or strs.
  :param user_features: scipy.sparse matrix, tensorflow.data.Dataset, str, or list
  A matrix of user features of shape [n_users, n_user_features].
  If a Dataset, the Dataset must follow the format used in tensorrec.input_utils.
  If a str, the string must be the path to a TFRecord file.
  If a list, the list must contain scipy.sparse matrices, tensorflow.data.Datasets, or strs.
  :param item_features: scipy.sparse matrix, tensorflow.data.Dataset, str, or list
  A matrix of item features of shape [n_items, n_item_features].
  If a Dataset, the Dataset must follow the format used in tensorrec.input_utils.
  If a str, the string must be the path to a TFRecord file.
  If a list, the list must contain scipy.sparse matrices, tensorflow.data.Datasets, or strs.
  :param epochs: Integer
  The number of epochs to fit the model.
  :param learning_rate: Float
  The learning rate of the model.
  :param alpha:
  The weight regularization loss coefficient.
  :param verbose: boolean
  If true, the model will print a number of status statements during fitting.
  :param user_batch_size: int or None
  The maximum number of users per batch, or None for all users.
  :param n_sampled_items: int or None
  The number of items to sample per user for use in loss functions. Must be non-None if
  self.loss_graph_factory.is_sample_based is True.
code: def fit(
      self,
      interactions,
      user_features,
      item_features,
      epochs=100,
      learning_rate=0.1,
      alpha=0.00001,
      verbose=False,
      user_batch_size=None,
      n_sampled_items=None,
  ):
      """
      Constructs the TensorRec graph and fits the model.
      :param interactions: scipy.sparse matrix, tensorflow.data.Dataset, str, or list
      A matrix of interactions of shape [n_users, n_items].
      If a Dataset, the Dataset must follow the format used in tensorrec.input_utils.
      If a str, the string must be the path to a TFRecord file.
      If a list, the list must contain scipy.sparse matrices, tensorflow.data.Datasets, or strs.
      :param user_features: scipy.sparse matrix, tensorflow.data.Dataset, str, or list
      A matrix of user features of shape [n_users, n_user_features].
      If a Dataset, the Dataset must follow the format used in tensorrec.input_utils.
      If a str, the string must be the path to a TFRecord file.
      If a list, the list must contain scipy.sparse matrices, tensorflow.data.Datasets, or strs.
      :param item_features: scipy.sparse matrix, tensorflow.data.Dataset, str, or list
      A matrix of item features of shape [n_items, n_item_features].
      If a Dataset, the Dataset must follow the format used in tensorrec.input_utils.
      If a str, the string must be the path to a TFRecord file.
      If a list, the list must contain scipy.sparse matrices, tensorflow.data.Datasets, or strs.
      :param epochs: Integer
      The number of epochs to fit the model.
      :param learning_rate: Float
      The learning rate of the model.
      :param alpha:
      The weight regularization loss coefficient.
      :param verbose: boolean
      If true, the model will print a number of status statements during fitting.
      :param user_batch_size: int or None
      The maximum number of users per batch, or None for all users.
      :param n_sampled_items: int or None
      The number of items to sample per user for use in loss functions. Must be non-None if
      self.loss_graph_factory.is_sample_based is True.
      """
  
      # Pass-through to fit_partial
      self.fit_partial(
          interactions=interactions,
          user_features=user_features,
          item_features=item_features,
          epochs=epochs,
          learning_rate=learning_rate,
          alpha=alpha,
          verbose=verbose,
          user_batch_size=user_batch_size,
          n_sampled_items=n_sampled_items,
      )
  
imports: from functools import partial
  from itertools import cycle
  import logging
  import numpy
  import os
  import pickle
  from scipy import sparse
  import tensorflow
  from .errors import ModelNotBiasedException, ModelNotFitException, ModelWithoutAttentionException, BatchNonSparseInputException, TfVersionException
  from .input_utils import create_tensorrec_iterator, get_dimensions_from_tensorrec_dataset
  from .loss_graphs import AbstractLossGraph, RMSELossGraph
  from .prediction_graphs import AbstractPredictionGraph, DotProductPredictionGraph
  from .recommendation_graphs import project_biases, split_sparse_tensor_indices, bias_prediction_dense, bias_prediction_serial, rank_predictions, densify_sampled_item_predictions, collapse_mixture_of_tastes, predict_similar_items
  from .representation_graphs import AbstractRepresentationGraph, LinearRepresentationGraph
  from .session_management import get_session
  from .util import sample_items, calculate_batched_alpha, datasets_from_raw_input
label_desc: Use image node_id 9 for calling the TensorRec obj's underlying member method code with example usage: obj.fit(interactions, user_features, item_features, epochs, learning_rate, alpha, verbose, user_batch_size, n_sampled_items) without return types