Returns support >>> get_support({5: {'11111': ['ab', 'ac', 'df', 'bd', 'bc']}, ... 4: {'11101': ['ef', 'eg', 'de', 'fg'], '11011': ['cd']}, ... 3: {'11001': ['ad'], '10101': ['dg']}, ... 2: {'10010': ['dh', 'bh'], '11000': ['be'], '101
(cluster)
| 97 | |
| 98 | |
| 99 | def get_support(cluster): |
| 100 | """ |
| 101 | Returns support |
| 102 | >>> get_support({5: {'11111': ['ab', 'ac', 'df', 'bd', 'bc']}, |
| 103 | ... 4: {'11101': ['ef', 'eg', 'de', 'fg'], '11011': ['cd']}, |
| 104 | ... 3: {'11001': ['ad'], '10101': ['dg']}, |
| 105 | ... 2: {'10010': ['dh', 'bh'], '11000': ['be'], '10100': ['gh'], |
| 106 | ... '10001': ['ce']}, |
| 107 | ... 1: {'00100': ['fh', 'eh'], '10000': ['hi']}}) |
| 108 | [100.0, 80.0, 60.0, 40.0, 20.0] |
| 109 | """ |
| 110 | return [i * 100 / len(cluster) for i in cluster] |
| 111 | |
| 112 | |
| 113 | def print_all() -> None: |
no outgoing calls
no test coverage detected