Completed
Push — master ( f5b818...34e888 )
by
unknown
02:02
created

ant_mean_clustering_params.__init__()   A

Complexity

Conditions 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
c 1
b 0
f 1
dl 0
loc 13
rs 9.4285
1
'''
2
Created on Jul 1, 2016
3
4
@author: alex
5
'''
6
7
import pyclustering.core.ant_mean_clustering_wrapper as wrapper
8
9
10
class ant_mean_clustering_params:
11
    
12
    def __init__(self):
13
        
14
        ## used for pheramone evaporation
15
        self.ro                 = 0.9
16
        
17
        ## initial value for pheramones
18
        self.pheramone_init     = 0.1
19
        
20
        ## amount of iterations that is used for solving
21
        self.iterations         = 50
22
        
23
        ## amount of ants that is used on each iteration
24
        self.count_ants         = 20
25
        
26
        
27
class ant_mean:
28
    
29
    def __init__(self, parameters):
30
        
31
        self.__parameters = None
32
        
33
        if (parameters is None):
34
            self.__parameters = ant_mean_clustering_params();
35
        else:
36
            self.__parameters = parameters;
37
            
38
    
39
    def process(self, count_clusters, samples):
40
        
41
        return wrapper.ant_mean_clustering_process(self.__parameters, count_clusters, samples)
42
        
43