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

Local excitatory global inhibitory oscillatory network (LEGION) that uses relaxation oscillator based on Van der Pol model. More...

+ Inheritance diagram for pyclustering.nnet.legion.legion_network:
+ Collaboration diagram for pyclustering.nnet.legion.legion_network:

Public Member Functions

def __init__ (self, num_osc, parameters=None, type_conn=conn_type.ALL_TO_ALL, type_conn_represent=conn_represent.MATRIX, ccore=True)
 Constructor of oscillatory network LEGION (local excitatory global inhibitory oscillatory network). More...
 
def __del__ (self)
 Default destructor of LEGION.
 
def __len__ (self)
 (uint) Returns size of LEGION.
 
def simulate (self, steps, time, stimulus, solution=solve_type.RK4, collect_dynamic=True)
 Performs static simulation of LEGION oscillatory network. 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 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

Local excitatory global inhibitory oscillatory network (LEGION) that uses relaxation oscillator based on Van der Pol model.

The model uses global inhibitor to de-synchronize synchronous ensembles of oscillators.

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

Example:

# Create parameters of the network
parameters = legion_parameters();
parameters.Wt = 4.0;
# Create stimulus
stimulus = [1, 1, 0, 0, 0, 1, 1, 1];
# Create the network (use CCORE for fast solving)
net = legion_network(len(stimulus), parameters, conn_type.GRID_FOUR, ccore = True);
# Simulate network - result of simulation is output dynamic of the network
output_dynamic = net.simulate(1000, 750, stimulus);
# Draw output dynamic
draw_dynamics(output_dynamic.time, output_dynamic.output, x_title = "Time", y_title = "x(t)");

Definition at line 194 of file legion.py.

Constructor & Destructor Documentation

◆ __init__()

def pyclustering.nnet.legion.legion_network.__init__ (   self,
  num_osc,
  parameters = None,
  type_conn = conn_type.ALL_TO_ALL,
  type_conn_represent = conn_represent.MATRIX,
  ccore = True 
)

Constructor of oscillatory network LEGION (local excitatory global inhibitory oscillatory network).

Parameters
[in]num_osc(uint): Number of oscillators in the network.
[in]parameters(legion_parameters): Parameters of the network that are defined by structure 'legion_parameters'.
[in]type_conn(conn_type): Type of connection between oscillators in the network.
[in]type_conn_represent(conn_represent): Internal representation of connection in the network: matrix or list.
[in]ccore(bool): If True then all interaction with object will be performed via CCORE library (C++ implementation of pyclustering).

Reimplemented from pyclustering.nnet.network.

Definition at line 224 of file legion.py.

Member Function Documentation

◆ simulate()

def pyclustering.nnet.legion.legion_network.simulate (   self,
  steps,
  time,
  stimulus,
  solution = solve_type.RK4,
  collect_dynamic = True 
)

Performs static simulation of LEGION oscillatory network.

Parameters
[in]steps(uint): Number steps of simulations during simulation.
[in]time(double): Time of simulation.
[in]stimulus(list): Stimulus for oscillators, number of stimulus should be equal to number of oscillators, example of stimulus for 5 oscillators [0, 0, 1, 1, 0], value of stimulus is defined by parameter 'I'.
[in]solution(solve_type): Method that is used for differential equation.
[in]collect_dynamic(bool): If True - returns whole dynamic of oscillatory network, otherwise returns only last values of dynamics.
Returns
(list) Dynamic of oscillatory network. If argument 'collect_dynamic' = True, than return dynamic for the whole simulation time, otherwise returns only last values (last step of simulation) of dynamic.

Definition at line 335 of file legion.py.


The documentation for this class was generated from the following file:
pyclustering.utils.draw_dynamics
def draw_dynamics(t, dyn, x_title=None, y_title=None, x_lim=None, y_lim=None, x_labels=True, y_labels=True, separate=False, axes=None)
Draw dynamics of neurons (oscillators) in the network.
Definition: __init__.py:829