code: def __init__(
      self,
      train_file=None,
      test_file=None,
      output_file=None,
      similarity_file=None,
      neighbors=20,
      factors=10,
      learn_rate=0.01,
      epochs=30,
      delta=0.015,
      init_mean=0.1,
      init_stdev=0.1,
      baseline=True,
      bias_learn_rate=0.005,
      delta_bias=0.002,
      stop_criteria=0.009,
      sep="\t",
      output_sep="\t",
      similarity_sep="\t",
      random_seed=None,
      verbose=True,
  ):
      super(ItemMSMF, self).__init__(
          train_file=train_file,
          test_file=test_file,
          output_file=output_file,
          sep=sep,
          learn_rate=learn_rate,
          factors=factors,
          epochs=epochs,
          delta=delta,
          init_mean=init_mean,
          init_stdev=init_stdev,
          baseline=baseline,
          bias_learn_rate=bias_learn_rate,
          delta_bias=delta_bias,
          stop_criteria=stop_criteria,
          output_sep=output_sep,
          random_seed=random_seed,
      )
  
      """
              Item-MSMF: Items Most Similar based on Matrix Factorization
  
              The Item-MSMF algorithm, this is recommender technique based on matrix factorization, that incorporates
              similarities of items which are calculated based on metadata. This approach to address the item
              cold-start through a shared latent factor vector representation of similar items based on those items
              which have enough interactions with users. In this way, the new items representations that are not
              accurate in terms of rating prediction, is replaced them with a weighted average of the latent factor
              vectors of the most similar items.
  
              Usage::
  
                  >> ItemMSMF(train, test, similarity_file, neighbors).compute()
                  
              :param train_file: File which contains the train set. This file needs to have at least 3 columns
              (user item feedback_value).
              :type train_file: str
      
              :param test_file: File which contains the test set. This file needs to have at least 3 columns
              (user item feedback_value).
              :type test_file: str, default None
              
              :param output_file: File with dir to write the final predictions
              :type output_file: str, default None
              
              :param similarity_file: File which contains the similarity of items. This file needs to have at least 3 columns
              (item item similarity).
              :type similarity_file: str, default None
              
              :param neighbors: Number of items that replace the new item vector
              :type neighbors: int, default 20
      
              :param factors: Number of latent factors per user/item
              :type factors: int, default 10
      
              :param learn_rate: Learning rate (alpha)
              :type learn_rate: float, default 0.05
      
              :param epochs: Number of epochs over the training data
              :type epochs: int, default 30
      
              :param delta: Regularization value
              :type delta: float, default 0.015
      
              :param init_mean: Mean of the normal distribution used to initialize the latent factors
              :type init_mean: float, default 0
      
              :param init_stdev: Standard deviation of the normal distribution used to initialize the latent factors
              :type init_stdev: float, default 0.1
      
              :param bias_learn_rate: Learning rate for baselines
              :type bias_learn_rate: float, default 0.005
      
              :param delta_bias: Regularization value for baselines
              :type delta_bias: float, default 0.002
      
              :param stop_criteria: Difference between errors for stopping criteria
              :type stop_criteria: float, default 0.009
      
              :param random_seed: Number of seed. Lock random numbers for reproducibility of experiments.
              :type random_seed: int, default None
              
              :param verbose: Print information
              :type verbose: bool, default True
                          
          """
  
      self.recommender_name = "Item-MSMF for Cold Start"
      self.verbose = verbose
  
      self.similarity_file = similarity_file
      self.similarity_sep = similarity_sep
      self.si_matrix = None
      self.new_items = set()
      self.k = neighbors
  
file_path: CaseRecommender/caserec/recommenders/rating_prediction/item_msmf.py
imports: import numpy
  from caserec.recommenders.rating_prediction.matrixfactorization import MatrixFactorization
  from caserec.utils.extra_functions import timed
label_desc: Use image node_id 1 to create a new ItemMSMF object from inherited base classes: MatrixFactorization with example: obj = ItemMSMF(train_file, test_file, output_file, similarity_file, neighbors, factors, learn_rate, epochs, delta, init_mean, init_stdev, baseline, bias_learn_rate, delta_bias, stop_criteria, sep, output_sep, similarity_sep, random_seed, verbose)