Skip to content

Commit

Permalink
Merged two concats into one
Browse files Browse the repository at this point in the history
Signed-off-by: David Davó <[email protected]>
  • Loading branch information
daviddavo committed Mar 20, 2024
1 parent 3821655 commit e049564
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions recommenders/models/rlrmc/RLRMCdataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ def _data_processing(self, train, validation=None, test=None, mean_center=True):
"""
# Data processing and reindexing code is adopted from https://github.com/Microsoft/Recommenders/blob/main/recommenders/models/ncf/dataset.py
# If validation dataset is None
df = train if validation is None else pd.concat([train, validation])
df = df if test is None else pd.concat([df, test])
df = pd.concat(filter(lambda x: x is not None, [train, validation, test]))

# Reindex user and item index
if self.user_idx is None:
Expand Down

0 comments on commit e049564

Please sign in to comment.