pyclustering  0.10.1
pyclustring is a Python, C++ data mining library.
pcnn.py
1 """!
2 
3 @brief Neural Network: Pulse Coupled Neural Network
4 @details Implementation based on paper @cite book::image_processing_using_pcnn.
5 
6 @authors Andrei Novikov (pyclustering@yandex.ru)
7 @date 2014-2020
8 @copyright BSD-3-Clause
9 
10 """
11 
12 import random
13 import numpy
14 
15 import matplotlib.pyplot as plt
16 import matplotlib.animation as animation
17 
18 from PIL import Image
19 
20 from pyclustering.nnet import *
21 
22 from pyclustering.core.wrapper import ccore_library
23 
24 import pyclustering.core.pcnn_wrapper as wrapper
25 
26 from pyclustering.utils import draw_dynamics
27 
28 
30  """!
31  @brief Parameters for pulse coupled neural network.
32 
33  """
34 
35  def __init__(self):
36  """!
37  @brief Default constructor of parameters for pulse-coupled neural network.
38  @details Constructor initializes parameters by default non-zero values that can be
39  used for simple simulation.
40  """
41 
42 
43  self.VF = 1.0
44 
45 
46  self.VL = 1.0
47 
48 
49  self.VT = 10.0
50 
51 
52 
53  self.AF = 0.1
54 
55 
56  self.AL = 0.1
57 
58 
59  self.AT = 0.5
60 
61 
62 
63  self.W = 1.0
64 
65 
66  self.M = 1.0
67 
68 
69 
70  self.B = 0.1
71 
72 
73  self.FAST_LINKING = False
74 
75 
77  """!
78  @brief Represents output dynamic of PCNN (pulse-coupled neural network).
79 
80  """
81 
82  @property
83  def output(self):
84  """!
85  @brief (list) Returns oscillato outputs during simulation.
86 
87  """
88  if self.__ccore_pcnn_dynamic_pointer is not None:
89  return wrapper.pcnn_dynamic_get_output(self.__ccore_pcnn_dynamic_pointer)
90 
91  return self.__dynamic
92 
93 
94  @property
95  def time(self):
96  """!
97  @brief (list) Returns sampling times when dynamic is measured during simulation.
98 
99  """
100  if self.__ccore_pcnn_dynamic_pointer is not None:
101  return wrapper.pcnn_dynamic_get_time(self.__ccore_pcnn_dynamic_pointer)
102 
103  return list(range(len(self)))
104 
105 
106  def __init__(self, dynamic, ccore=None):
107  """!
108  @brief Constructor of PCNN dynamic.
109 
110  @param[in] dynamic (list): Dynamic of oscillators on each step of simulation. If ccore pointer is specified than it can be ignored.
111  @param[in] ccore (ctypes.pointer): Pointer to CCORE pcnn_dynamic instance in memory.
112 
113  """
114  self.__OUTPUT_TRUE = 1 # fire value for oscillators.
115  self.__OUTPUT_FALSE = 0 # rest value for oscillators.
116 
117  self.__dynamic = dynamic
118  self.__ccore_pcnn_dynamic_pointer = ccore
119 
120 
121  def __del__(self):
122  """!
123  @brief Default destructor of PCNN dynamic.
124 
125  """
126  if self.__ccore_pcnn_dynamic_pointer is not None:
127  wrapper.pcnn_dynamic_destroy(self.__ccore_pcnn_dynamic_pointer)
128 
129 
130  def __len__(self):
131  """!
132  @brief (uint) Returns number of simulation steps that are stored in dynamic.
133 
134  """
135  if self.__ccore_pcnn_dynamic_pointer is not None:
136  return wrapper.pcnn_dynamic_get_size(self.__ccore_pcnn_dynamic_pointer)
137 
138  return len(self.__dynamic)
139 
140 
142  """!
143  @brief Allocate clusters in line with ensembles of synchronous oscillators where each
144  synchronous ensemble corresponds to only one cluster.
145 
146  @return (list) Grours (lists) of indexes of synchronous oscillators.
147  For example, [ [index_osc1, index_osc3], [index_osc2], [index_osc4, index_osc5] ].
148 
149  """
150 
151  if self.__ccore_pcnn_dynamic_pointer is not None:
152  return wrapper.pcnn_dynamic_allocate_sync_ensembles(self.__ccore_pcnn_dynamic_pointer)
153 
154  sync_ensembles = []
155  traverse_oscillators = set()
156 
157  number_oscillators = len(self.__dynamic[0])
158 
159  for t in range(len(self.__dynamic) - 1, 0, -1):
160  sync_ensemble = []
161  for i in range(number_oscillators):
162  if self.__dynamic[t][i] == self.__OUTPUT_TRUE:
163  if i not in traverse_oscillators:
164  sync_ensemble.append(i)
165  traverse_oscillators.add(i)
166 
167  if sync_ensemble != []:
168  sync_ensembles.append(sync_ensemble)
169 
170  return sync_ensembles
171 
172 
174  """!
175  @brief Analyses output dynamic of network and allocates spikes on each iteration as a list of indexes of oscillators.
176  @details Each allocated spike ensemble represents list of indexes of oscillators whose output is active.
177 
178  @return (list) Spike ensembles of oscillators.
179 
180  """
181 
182  if self.__ccore_pcnn_dynamic_pointer is not None:
183  return wrapper.pcnn_dynamic_allocate_spike_ensembles(self.__ccore_pcnn_dynamic_pointer)
184 
185  spike_ensembles = []
186  number_oscillators = len(self.__dynamic[0])
187 
188  for t in range(len(self.__dynamic)):
189  spike_ensemble = []
190 
191  for index in range(number_oscillators):
192  if self.__dynamic[t][index] == self.__OUTPUT_TRUE:
193  spike_ensemble.append(index)
194 
195  if len(spike_ensemble) > 0:
196  spike_ensembles.append(spike_ensemble)
197 
198  return spike_ensembles
199 
200 
202  """!
203  @brief Analyses output dynamic and calculates time signal (signal vector information) of network output.
204 
205  @return (list) Time signal of network output.
206 
207  """
208 
209  if self.__ccore_pcnn_dynamic_pointer is not None:
210  return wrapper.pcnn_dynamic_allocate_time_signal(self.__ccore_pcnn_dynamic_pointer)
211 
212  signal_vector_information = []
213  for t in range(0, len(self.__dynamic)):
214  signal_vector_information.append(sum(self.__dynamic[t]))
215 
216  return signal_vector_information
217 
218 
220  """!
221  @brief Visualizer of output dynamic of pulse-coupled neural network (PCNN).
222 
223  """
224 
225  @staticmethod
226  def show_time_signal(pcnn_output_dynamic):
227  """!
228  @brief Shows time signal (signal vector information) using network dynamic during simulation.
229 
230  @param[in] pcnn_output_dynamic (pcnn_dynamic): Output dynamic of the pulse-coupled neural network.
231 
232  """
233 
234  time_signal = pcnn_output_dynamic.allocate_time_signal()
235  time_axis = range(len(time_signal))
236 
237  plt.subplot(1, 1, 1)
238  plt.plot(time_axis, time_signal, '-')
239  plt.ylabel("G (time signal)")
240  plt.xlabel("t (iteration)")
241  plt.grid(True)
242 
243  plt.show()
244 
245  @staticmethod
246  def show_output_dynamic(pcnn_output_dynamic, separate_representation = False):
247  """!
248  @brief Shows output dynamic (output of each oscillator) during simulation.
249 
250  @param[in] pcnn_output_dynamic (pcnn_dynamic): Output dynamic of the pulse-coupled neural network.
251  @param[in] separate_representation (list): Consists of lists of oscillators where each such list consists of oscillator indexes that will be shown on separated stage.
252 
253  """
254 
255  draw_dynamics(pcnn_output_dynamic.time, pcnn_output_dynamic.output, x_title = "t", y_title = "y(t)", separate = separate_representation)
256 
257  @staticmethod
258  def animate_spike_ensembles(pcnn_output_dynamic, image_size):
259  """!
260  @brief Shows animation of output dynamic (output of each oscillator) during simulation.
261 
262  @param[in] pcnn_output_dynamic (pcnn_dynamic): Output dynamic of the pulse-coupled neural network.
263  @param[in] image_size (tuple): Image size represented as (height, width).
264 
265  """
266 
267  figure = plt.figure()
268 
269  time_signal = pcnn_output_dynamic.allocate_time_signal()
270  spike_ensembles = pcnn_output_dynamic.allocate_spike_ensembles()
271 
272  spike_animation = []
273  ensemble_index = 0
274  for t in range(len(time_signal)):
275  image_color_segments = [(255, 255, 255)] * (image_size[0] * image_size[1])
276 
277  if time_signal[t] > 0:
278  for index_pixel in spike_ensembles[ensemble_index]:
279  image_color_segments[index_pixel] = (0, 0, 0)
280 
281  ensemble_index += 1
282 
283  stage = numpy.array(image_color_segments, numpy.uint8)
284  stage = numpy.reshape(stage, image_size + ((3),)) # ((3),) it's size of RGB - third dimension.
285  image_cluster = Image.fromarray(stage, 'RGB')
286 
287  spike_animation.append( [ plt.imshow(image_cluster, interpolation='none') ] )
288 
289 
290  im_ani = animation.ArtistAnimation(figure, spike_animation, interval=75, repeat_delay=3000, blit=True)
291  plt.show()
292 
293 
295  """!
296  @brief Model of oscillatory network that is based on the Eckhorn model.
297 
298  @details CCORE option can be used to use the pyclustering core - C/C++ shared library for processing that significantly increases performance.
299 
300  Here is an example how to perform PCNN simulation:
301  @code
302  from pyclustering.nnet.pcnn import pcnn_network, pcnn_visualizer
303 
304  # Create Pulse-Coupled neural network with 10 oscillators.
305  net = pcnn_network(10)
306 
307  # Perform simulation during 100 steps using binary external stimulus.
308  dynamic = net.simulate(50, [1, 1, 1, 0, 0, 0, 0, 1, 1, 1])
309 
310  # Allocate synchronous ensembles from the output dynamic.
311  ensembles = dynamic.allocate_sync_ensembles()
312 
313  # Show output dynamic.
314  pcnn_visualizer.show_output_dynamic(dynamic, ensembles)
315  @endcode
316 
317  """
318 
319  __OUTPUT_TRUE = 1 # fire value for oscillators.
320  __OUTPUT_FALSE = 0 # rest value for oscillators.
321 
322  def __init__(self, num_osc, parameters=None, type_conn=conn_type.ALL_TO_ALL, type_conn_represent=conn_represent.MATRIX, height=None, width=None, ccore=True):
323  """!
324  @brief Constructor of oscillatory network is based on Kuramoto model.
325 
326  @param[in] num_osc (uint): Number of oscillators in the network.
327  @param[in] parameters (pcnn_parameters): Parameters of the network.
328  @param[in] type_conn (conn_type): Type of connection between oscillators in the network (all-to-all, grid, bidirectional list, etc.).
329  @param[in] type_conn_represent (conn_represent): Internal representation of connection in the network: matrix or list.
330  @param[in] height (uint): Number of oscillators in column of the network, this argument is used
331  only for network with grid structure (GRID_FOUR, GRID_EIGHT), for other types this argument is ignored.
332  @param[in] width (uint): Number of oscillotors in row of the network, this argument is used only
333  for network with grid structure (GRID_FOUR, GRID_EIGHT), for other types this argument is ignored.
334  @param[in] ccore (bool): If True then all interaction with object will be performed via CCORE library (C++ implementation of pyclustering).
335 
336  """
337 
338  self._outputs = None # list of outputs of oscillators.
339 
340  self._feeding = None # feeding compartment of each oscillator.
341  self._linking = None # linking compartment of each oscillator.
342  self._threshold = None # threshold of each oscillator.
343 
344  self._params = None
345 
346  self.__ccore_pcnn_pointer = None
347 
348  # set parameters of the network
349  if parameters is not None:
350  self._params = parameters
351  else:
352  self._params = pcnn_parameters()
353 
354  if (ccore is True) and ccore_library.workable():
355  network_height = height
356  network_width = width
357 
358  if (type_conn == conn_type.GRID_FOUR) or (type_conn == conn_type.GRID_EIGHT):
359  if (network_height is None) or (network_width is None):
360  side_size = num_osc ** (0.5)
361  if side_size - math.floor(side_size) > 0:
362  raise NameError('Invalid number of oscillators in the network in case of grid structure')
363 
364  network_height = int(side_size)
365  network_width = int(side_size)
366  else:
367  network_height = 0
368  network_width = 0
369 
370  self.__ccore_pcnn_pointer = wrapper.pcnn_create(num_osc, type_conn, network_height, network_width, self._params)
371  else:
372  super().__init__(num_osc, type_conn, type_conn_represent, height, width)
373 
374  self._outputs = [0.0] * self._num_osc
375 
376  self._feeding = [0.0] * self._num_osc
377  self._linking = [0.0] * self._num_osc
378  self._threshold = [ random.random() for i in range(self._num_osc) ]
379 
380 
381  def __del__(self):
382  """!
383  @brief Default destructor of PCNN.
384 
385  """
386  if self.__ccore_pcnn_pointer is not None:
387  wrapper.pcnn_destroy(self.__ccore_pcnn_pointer)
388  self.__ccore_pcnn_pointer = None
389 
390 
391  def __len__(self):
392  """!
393  @brief (uint) Returns size of oscillatory network.
394 
395  """
396 
397  if self.__ccore_pcnn_pointer is not None:
398  return wrapper.pcnn_get_size(self.__ccore_pcnn_pointer)
399 
400  return self._num_osc
401 
402 
403  def simulate(self, steps, stimulus):
404  """!
405  @brief Performs static simulation of pulse coupled neural network using.
406 
407  @param[in] steps (uint): Number steps of simulations during simulation.
408  @param[in] stimulus (list): Stimulus for oscillators, number of stimulus should be equal to number of oscillators.
409 
410  @return (pcnn_dynamic) Dynamic of oscillatory network - output of each oscillator on each step of simulation.
411 
412  """
413 
414  if len(stimulus) != len(self):
415  raise NameError('Number of stimulus should be equal to number of oscillators. Each stimulus corresponds to only one oscillators.')
416 
417  if self.__ccore_pcnn_pointer is not None:
418  ccore_instance_dynamic = wrapper.pcnn_simulate(self.__ccore_pcnn_pointer, steps, stimulus)
419  return pcnn_dynamic(None, ccore_instance_dynamic)
420 
421  dynamic = []
422  dynamic.append(self._outputs)
423 
424  for step in range(1, steps, 1):
425  self._outputs = self._calculate_states(stimulus)
426 
427  dynamic.append(self._outputs)
428 
429  return pcnn_dynamic(dynamic)
430 
431 
432  def _calculate_states(self, stimulus):
433  """!
434  @brief Calculates states of oscillators in the network for current step and stored them except outputs of oscillators.
435 
436  @param[in] stimulus (list): Stimulus for oscillators, number of stimulus should be equal to number of oscillators.
437 
438  @return (list) New outputs for oscillators (do not stored it).
439 
440  """
441 
442  feeding = [0.0] * self._num_osc
443  linking = [0.0] * self._num_osc
444  outputs = [0.0] * self._num_osc
445  threshold = [0.0] * self._num_osc
446 
447  for index in range(0, self._num_osc, 1):
448  neighbors = self.get_neighbors(index)
449 
450  feeding_influence = 0.0
451  linking_influence = 0.0
452 
453  for index_neighbour in neighbors:
454  feeding_influence += self._outputs[index_neighbour] * self._params.M
455  linking_influence += self._outputs[index_neighbour] * self._params.W
456 
457  feeding_influence *= self._params.VF
458  linking_influence *= self._params.VL
459 
460  feeding[index] = self._params.AF * self._feeding[index] + stimulus[index] + feeding_influence
461  linking[index] = self._params.AL * self._linking[index] + linking_influence
462 
463  # calculate internal activity
464  internal_activity = feeding[index] * (1.0 + self._params.B * linking[index])
465 
466  # calculate output of the oscillator
467  if internal_activity > self._threshold[index]:
468  outputs[index] = self.__OUTPUT_TRUE
469  else:
470  outputs[index] = self.__OUTPUT_FALSE
471 
472  # In case of Fast Linking we should calculate threshold until output is changed.
473  if self._params.FAST_LINKING is not True:
474  threshold[index] = self._params.AT * self._threshold[index] + self._params.VT * outputs[index]
475 
476  # In case of Fast Linking we need to wait until output is changed.
477  if self._params.FAST_LINKING is True:
478  output_change = True # Set it True for the for the first iteration.
479  previous_outputs = outputs[:]
480 
481  while output_change is True:
482  current_output_change = False
483 
484  for index in range(0, self._num_osc, 1):
485  linking_influence = 0.0
486 
487  neighbors = self.get_neighbors(index)
488  for index_neighbour in neighbors:
489  linking_influence += previous_outputs[index_neighbour] * self._params.W
490 
491  linking_influence *= self._params.VL
492  linking[index] = linking_influence
493 
494  internal_activity = feeding[index] * (1.0 + self._params.B * linking[index])
495 
496  # calculate output of the oscillator
497  if internal_activity > self._threshold[index]:
498  outputs[index] = self.__OUTPUT_TRUE
499  else:
500  outputs[index] = self.__OUTPUT_FALSE
501 
502  current_output_change |= (outputs[index] != previous_outputs[index])
503 
504  output_change = current_output_change
505 
506  if output_change is True:
507  previous_outputs = outputs[:]
508 
509  # In case of Fast Linking threshold should be calculated after fast linking.
510  if self._params.FAST_LINKING is True:
511  for index in range(0, self._num_osc, 1):
512  threshold[index] = self._params.AT * self._threshold[index] + self._params.VT * outputs[index]
513 
514  self._feeding = feeding[:]
515  self._linking = linking[:]
516  self._threshold = threshold[:]
517 
518  return outputs
pyclustering.nnet.pcnn.pcnn_parameters.VT
VT
Multiplier for the threshold at the current step.
Definition: pcnn.py:49
pyclustering.nnet.pcnn.pcnn_dynamic.__dynamic
__dynamic
Definition: pcnn.py:117
pyclustering.nnet.pcnn.pcnn_network.__init__
def __init__(self, num_osc, parameters=None, type_conn=conn_type.ALL_TO_ALL, type_conn_represent=conn_represent.MATRIX, height=None, width=None, ccore=True)
Constructor of oscillatory network is based on Kuramoto model.
Definition: pcnn.py:322
pyclustering.nnet.pcnn.pcnn_dynamic.allocate_spike_ensembles
def allocate_spike_ensembles(self)
Analyses output dynamic of network and allocates spikes on each iteration as a list of indexes of osc...
Definition: pcnn.py:173
pyclustering.nnet.pcnn.pcnn_network._linking
_linking
Definition: pcnn.py:341
pyclustering.nnet.pcnn.pcnn_visualizer.show_output_dynamic
def show_output_dynamic(pcnn_output_dynamic, separate_representation=False)
Shows output dynamic (output of each oscillator) during simulation.
Definition: pcnn.py:246
pyclustering.nnet.pcnn.pcnn_dynamic.output
def output(self)
(list) Returns oscillato outputs during simulation.
Definition: pcnn.py:83
pyclustering.nnet.pcnn.pcnn_network.__OUTPUT_TRUE
int __OUTPUT_TRUE
Definition: pcnn.py:319
pyclustering.nnet.pcnn.pcnn_parameters.VF
VF
Multiplier for the feeding compartment at the current step.
Definition: pcnn.py:43
pyclustering.nnet.pcnn.pcnn_dynamic.__len__
def __len__(self)
(uint) Returns number of simulation steps that are stored in dynamic.
Definition: pcnn.py:130
pyclustering.nnet.pcnn.pcnn_network.__del__
def __del__(self)
Default destructor of PCNN.
Definition: pcnn.py:381
pyclustering.nnet.pcnn.pcnn_network._calculate_states
def _calculate_states(self, stimulus)
Calculates states of oscillators in the network for current step and stored them except outputs of os...
Definition: pcnn.py:432
pyclustering.nnet.network._num_osc
int _num_osc
Definition: __init__.py:88
pyclustering.nnet.pcnn.pcnn_dynamic.__OUTPUT_FALSE
__OUTPUT_FALSE
Definition: pcnn.py:115
pyclustering.nnet.pcnn.pcnn_dynamic.__del__
def __del__(self)
Default destructor of PCNN dynamic.
Definition: pcnn.py:121
pyclustering.nnet.pcnn.pcnn_network._params
_params
Definition: pcnn.py:344
pyclustering.nnet.pcnn.pcnn_dynamic.__OUTPUT_TRUE
__OUTPUT_TRUE
Definition: pcnn.py:114
pyclustering.nnet.pcnn.pcnn_network.__ccore_pcnn_pointer
__ccore_pcnn_pointer
Definition: pcnn.py:346
pyclustering.nnet.pcnn.pcnn_dynamic.allocate_time_signal
def allocate_time_signal(self)
Analyses output dynamic and calculates time signal (signal vector information) of network output.
Definition: pcnn.py:201
pyclustering.nnet.pcnn.pcnn_parameters.__init__
def __init__(self)
Default constructor of parameters for pulse-coupled neural network.
Definition: pcnn.py:35
pyclustering.nnet.pcnn.pcnn_visualizer.animate_spike_ensembles
def animate_spike_ensembles(pcnn_output_dynamic, image_size)
Shows animation of output dynamic (output of each oscillator) during simulation.
Definition: pcnn.py:258
pyclustering.nnet.network
Common network description that consists of information about oscillators and connection between them...
Definition: __init__.py:82
pyclustering.nnet.pcnn.pcnn_visualizer
Visualizer of output dynamic of pulse-coupled neural network (PCNN).
Definition: pcnn.py:219
pyclustering.nnet.network.get_neighbors
def get_neighbors(self, index)
Finds neighbors of the oscillator with specified index.
Definition: __init__.py:394
pyclustering.nnet.pcnn.pcnn_parameters.AF
AF
Multiplier for the feeding compartment at the previous step.
Definition: pcnn.py:53
pyclustering.nnet.pcnn.pcnn_network._feeding
_feeding
Definition: pcnn.py:340
pyclustering.nnet.pcnn.pcnn_parameters
Parameters for pulse coupled neural network.
Definition: pcnn.py:29
pyclustering.nnet.pcnn.pcnn_parameters.FAST_LINKING
FAST_LINKING
Enable/disable Fast-Linking mode.
Definition: pcnn.py:73
pyclustering.nnet.pcnn.pcnn_parameters.M
M
Synaptic weight - neighbours influence on feeding compartment.
Definition: pcnn.py:66
pyclustering.nnet.pcnn.pcnn_parameters.AT
AT
Multiplier for the threshold at the previous step.
Definition: pcnn.py:59
pyclustering.nnet.pcnn.pcnn_network
Model of oscillatory network that is based on the Eckhorn model.
Definition: pcnn.py:294
pyclustering.nnet.pcnn.pcnn_network.__OUTPUT_FALSE
int __OUTPUT_FALSE
Definition: pcnn.py:320
pyclustering.nnet
Neural and oscillatory network module. Consists of models of bio-inspired networks.
Definition: __init__.py:1
pyclustering.nnet.pcnn.pcnn_parameters.AL
AL
Multiplier for the linking compartment at the previous step.
Definition: pcnn.py:56
pyclustering.nnet.pcnn.pcnn_network._outputs
_outputs
Definition: pcnn.py:338
pyclustering.nnet.pcnn.pcnn_network._threshold
_threshold
Definition: pcnn.py:342
pyclustering.nnet.pcnn.pcnn_dynamic
Represents output dynamic of PCNN (pulse-coupled neural network).
Definition: pcnn.py:76
pyclustering.nnet.pcnn.pcnn_dynamic.__init__
def __init__(self, dynamic, ccore=None)
Constructor of PCNN dynamic.
Definition: pcnn.py:106
pyclustering.nnet.pcnn.pcnn_parameters.VL
VL
Multiplier for the linking compartment at the current step.
Definition: pcnn.py:46
pyclustering.nnet.pcnn.pcnn_network.__len__
def __len__(self)
(uint) Returns size of oscillatory network.
Definition: pcnn.py:391
pyclustering.nnet.pcnn.pcnn_dynamic.allocate_sync_ensembles
def allocate_sync_ensembles(self)
Allocate clusters in line with ensembles of synchronous oscillators where each synchronous ensemble c...
Definition: pcnn.py:141
pyclustering.nnet.pcnn.pcnn_dynamic.__ccore_pcnn_dynamic_pointer
__ccore_pcnn_dynamic_pointer
Definition: pcnn.py:118
pyclustering.nnet.pcnn.pcnn_dynamic.time
def time(self)
(list) Returns sampling times when dynamic is measured during simulation.
Definition: pcnn.py:95
pyclustering.nnet.pcnn.pcnn_parameters.B
B
Linking strength in the network.
Definition: pcnn.py:70
pyclustering.utils
Utils that are used by modules of pyclustering.
Definition: __init__.py:1
pyclustering.nnet.pcnn.pcnn_network.simulate
def simulate(self, steps, stimulus)
Performs static simulation of pulse coupled neural network using.
Definition: pcnn.py:403
pyclustering.nnet.pcnn.pcnn_visualizer.show_time_signal
def show_time_signal(pcnn_output_dynamic)
Shows time signal (signal vector information) using network dynamic during simulation.
Definition: pcnn.py:226
pyclustering.nnet.pcnn.pcnn_parameters.W
W
Synaptic weight - neighbours influence on linking compartment.
Definition: pcnn.py:63