|
@@ -30,10 +30,7 @@ def parse_params(param_str):
|
|
if param_str:
|
|
if param_str:
|
|
for key_value_str in param_str.split(','):
|
|
for key_value_str in param_str.split(','):
|
|
key, value = key_value_str.split('=')
|
|
key, value = key_value_str.split('=')
|
|
- if key in ['hc', 'wc']:
|
|
|
|
- dict_params[key] = [file for file in value.split(':')]
|
|
|
|
- else:
|
|
|
|
- dict_params[key] = parse_value(value)
|
|
|
|
|
|
+ dict_params[key] = parse_value(value)
|
|
return dict_params
|
|
return dict_params
|
|
|
|
|
|
def get_seconds(time_str):
|
|
def get_seconds(time_str):
|
|
@@ -73,6 +70,15 @@ def make_clusters(nb_clusters, nodes):
|
|
clusters[i][j] += [node]
|
|
clusters[i][j] += [node]
|
|
return clusters
|
|
return clusters
|
|
|
|
|
|
|
|
+def make_densities(nb_clusters, radius, centers):
|
|
|
|
+ ''' make a list of gaussian probability densities '''
|
|
|
|
+ densities = np.zeros((nb_clusters, nb_clusters))
|
|
|
|
+ if centers is None:
|
|
|
|
+ return densities + 1
|
|
|
|
+ for n, c in enumerate(centers):
|
|
|
|
+ densities += make_gaussian(nb_clusters, radius=radius[n], center=c)
|
|
|
|
+ return densities
|
|
|
|
+
|
|
# random generators
|
|
# random generators
|
|
# ------------------
|
|
# ------------------
|
|
|
|
|