tave-st commited on
Commit
49e3cdc
1 Parent(s): d6a157a

add random state to recommender

Browse files
Files changed (2) hide show
  1. pages/clustering.py +1 -0
  2. recommender_system.py +1 -0
pages/clustering.py CHANGED
@@ -248,6 +248,7 @@ def plot_rfm_distribution(df_rfm: pd.DataFrame, cluster_info: Dict[str, List[int
248
  # Add vertical bar on each cluster end. But skip the last cluster.
249
  loop_range = list(enumerate(range(1, len(values)-1, 2)))
250
  if to_reverse:
 
251
  loop_range = zip((2, 1), range(len(values)-1, 1, -2))
252
  for n_cluster, i in loop_range:
253
  print(x)
 
248
  # Add vertical bar on each cluster end. But skip the last cluster.
249
  loop_range = list(enumerate(range(1, len(values)-1, 2)))
250
  if to_reverse:
251
+ # @todo: remove hardcoded values
252
  loop_range = zip((2, 1), range(len(values)-1, 1, -2))
253
  for n_cluster, i in loop_range:
254
  print(x)
recommender_system.py CHANGED
@@ -69,6 +69,7 @@ def create_and_fit_recommender(
69
  factors=190,
70
  alpha=0.6,
71
  regularization=0.06,
 
72
  ),
73
  )
74
  return recommender
 
69
  factors=190,
70
  alpha=0.6,
71
  regularization=0.06,
72
+ random_state=42,
73
  ),
74
  )
75
  return recommender