Total Complexity | 5 |
Total Lines | 12 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | import random; |
||
4 | class random_center_initializer: |
||
5 | def __init__(self, data, amount_centers): |
||
6 | self.__data = data; |
||
7 | self.__amount = amount_centers; |
||
8 | |||
9 | |||
10 | def initialize(self): |
||
11 | return [ self.__create_center() for _ in range(len(self.__amount)) ]; |
||
12 | |||
13 | |||
14 | def __create_center(self): |
||
15 | return [ random.random() for _ in range(len(self.__data[0])) ]; |
||
16 | |||
29 | return None; |