Closed shashist closed 2 years ago
DataPreparator fails to use Indexer.(user|item)_indexer when calling with user_features and/or item_features. Because Indexer.(user|item)_indexer expects calling Indexer.fit() before Indexer.transfrom().
DataPreparator
Indexer.(user|item)_indexer
Indexer.fit()
Indexer.transfrom()
import pandas as pd from replay.data_preparator import DataPreparator df = pd.read_csv( "experiments/data/ml1m_ratings.dat", sep="\t", names=["user_id", "item_id", "relevance", "timestamp"] ) users = pd.read_csv( "experiments/data/ml1m_users.dat", sep="\t", names=["user_id", "gender", "age", "occupation", "zip_code"] ) data_preparator = DataPreparator() log, user_features, _ = data_preparator(df, users)
Probably Indexer.fit() should be used earlier in DataPreparator.__call__()
DataPreparator.__call__()
DataPreparator
fails to useIndexer.(user|item)_indexer
when calling with user_features and/or item_features. BecauseIndexer.(user|item)_indexer
expects callingIndexer.fit()
beforeIndexer.transfrom()
.How to reproduce
Expected behavior
Probably
Indexer.fit()
should be used earlier inDataPreparator.__call__()