Initially, I have a dataset where for each row there is user_id and product_ids he bought.
In that dataset there are 478191 products bought by different users.
In order to discover frequent items that are bought together, I will use association rules, apriori algorithm. As apriori algorithm expects to have the features one-hot encoded. I need the product_ids one-hot encoded.
Scikit-learn one-Hot encoding (sparse matrix=True) resulted in memory error. What other methods can I try? (using Python)