best data format for clustering

Viewed 16

community,

I would like to ask you for an advice about best input data format for clustering using python.

In:

1 [12, 5, 89, 5476, 32657, 1, 5]
2 [5,8, 12, 65, 658465,3]
3 [12, 8]
4 [8975, 12, 5698, 1, 5, 96]
5 [12, 5, 8]
6 [12, 5476, 1, 5]

I need to find out by clustering which numbers are presented rarely in combination with number 12.

I am not sure if I should split the values in 2 columns (one columne containing value lists) or multiple columns:

1 12 [5, 89, 5476, 32657, 1, 5]
2 12 [5,8, 65, 658465,3]
3 12 [8]
4 12 [8975, 5698, 1, 5, 96]
5 12 [5, 8]
6 12 [5476, 1, 5]

or split the lists in the way that each value (number) has its own column:

1 12 5 89 5476 32657 1 5
2 12 5 8 65 658465 3 
3 12 8
4 12 8975 5698 1 5 96 
5 12 5 8

Thank you very much. 6 12 [5476, 1, 5]

0 Answers
Related