Hi, thank you for this wonderful and useful code. I was wondering two things for now:
Why is belongs_to_cluster dimension 55 when there are 50 variables? It goes from the definition of cluster_size = [5,22,28] that also adds up to 55. Later on, dimensions fall back to 50 because n_variables is used.
I would love to understand the following list comprehension you wrote: belongs_to_cluster = [i for i, c in enumerate(cluster_size) for n in range(c)]
I know what the result is, but I don't understand what this i for i does. Cannot find it in the literature. :/
UPDATE: got it. it's more understandable if written: [i for (i, c) in enumerate(cluster_size) for n in range(c)]. Without the parenthesis looked weird for me :D