pyclustering  0.10.1 pyclustring is a Python, C++ data mining library.
pyclustering.nnet.pcnn.pcnn_network Class Reference

Model of oscillatory network that is based on the Eckhorn model. More...

Inheritance diagram for pyclustering.nnet.pcnn.pcnn_network:
Collaboration diagram for pyclustering.nnet.pcnn.pcnn_network:

## Public Member Functions

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. More...

def __del__ (self)
Default destructor of PCNN.

def __len__ (self)
(uint) Returns size of oscillatory network.

def simulate (self, steps, stimulus)
Performs static simulation of pulse coupled neural network using. More...

Public Member Functions inherited from pyclustering.nnet.network
def height (self)
Height of the network grid (that is defined by amout of oscillators in each column), this value is zero in case of non-grid structure. More...

def width (self)
Width of the network grid, this value is zero in case of non-grid structure. More...

def structure (self)
Type of network structure that is used for connecting oscillators.

def __init__ (self, num_osc, type_conn=conn_type.ALL_TO_ALL, conn_repr=conn_represent.MATRIX, height=None, width=None)
Constructor of the network. More...

def has_connection (self, i, j)
Returns True if there is connection between i and j oscillators and False - if connection doesn't exist. More...

def set_connection (self, i, j)
Couples two specified oscillators in the network with dynamic connections. More...

def get_neighbors (self, index)
Finds neighbors of the oscillator with specified index. More...

## Detailed Description

Model of oscillatory network that is based on the Eckhorn model.

CCORE option can be used to use the pyclustering core - C/C++ shared library for processing that significantly increases performance.

Here is an example how to perform PCNN simulation:

from pyclustering.nnet.pcnn import pcnn_network, pcnn_visualizer
# Create Pulse-Coupled neural network with 10 oscillators.
net = pcnn_network(10)
# Perform simulation during 100 steps using binary external stimulus.
dynamic = net.simulate(50, [1, 1, 1, 0, 0, 0, 0, 1, 1, 1])
# Allocate synchronous ensembles from the output dynamic.
ensembles = dynamic.allocate_sync_ensembles()
# Show output dynamic.
pcnn_visualizer.show_output_dynamic(dynamic, ensembles)

Definition at line 294 of file pcnn.py.

## ◆ __init__()

 def pyclustering.nnet.pcnn.pcnn_network.__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.

Parameters
 [in] num_osc (uint): Number of oscillators in the network. [in] parameters (pcnn_parameters): Parameters of the network. [in] type_conn (conn_type): Type of connection between oscillators in the network (all-to-all, grid, bidirectional list, etc.). [in] type_conn_represent (conn_represent): Internal representation of connection in the network: matrix or list. [in] height (uint): Number of oscillators in column of the network, this argument is used only for network with grid structure (GRID_FOUR, GRID_EIGHT), for other types this argument is ignored. [in] width (uint): Number of oscillotors in row of the network, this argument is used only for network with grid structure (GRID_FOUR, GRID_EIGHT), for other types this argument is ignored. [in] ccore (bool): If True then all interaction with object will be performed via CCORE library (C++ implementation of pyclustering).

Definition at line 322 of file pcnn.py.

## ◆ simulate()

 def pyclustering.nnet.pcnn.pcnn_network.simulate ( self, steps, stimulus )

Performs static simulation of pulse coupled neural network using.

Parameters
 [in] steps (uint): Number steps of simulations during simulation. [in] stimulus (list): Stimulus for oscillators, number of stimulus should be equal to number of oscillators.
Returns
(pcnn_dynamic) Dynamic of oscillatory network - output of each oscillator on each step of simulation.

Definition at line 403 of file pcnn.py.

The documentation for this class was generated from the following file:
pyclustering.nnet.pcnn
Neural Network: Pulse Coupled Neural Network.
Definition: pcnn.py:1