I'm trying to cluster sets by their similarity in terms of included elements. The group of possible elements is of size ~1 million. It is my understanding that in order to run k-means or a similar algorithm I'd have to create a dataframe that has a correspondingly large number of columns. This doesn't seem feasible.
Is there a clustering algorithm better suited for this problem? Will I be able to solve this problem as I've formulated it?