docstr: This method performs Non-negative matrix factorization over the training data.
docstr_tok: ["This","method","performs","Non-negative","matrix","factorization","over","the","training","data","."]
code: def fit(self):
      """
      This method performs Non-negative matrix factorization over the training data.
  
      """
  
      model = NMF(
          n_components=self.factors, init="random", random_state=0
      )
  
      P = model.fit_transform(self.matrix)
  
      Q = model.components_
  
      self.prediction_matrix = np.dot(P, Q)
  
file_path: CaseRecommender/caserec/recommenders/rating_prediction/nnmf.py
imports: import numpy
  from sklearn.decomposition import NMF
  from caserec.recommenders.rating_prediction.base_rating_prediction import BaseRatingPrediction
  from caserec.utils.extra_functions import timed
label_desc: Use image node_id 3 for calling the NNMF obj's underlying member method code with example usage: obj.fit() without return types