pyclustering.nnet.hysteresis.hysteresis_network Class Reference

Hysteresis oscillatory network that uses relaxation oscillators that are represented by objective hysteresis neurons whose output in range [-1, +1]. More...

+ Inheritance diagram for pyclustering.nnet.hysteresis.hysteresis_network:
+ Collaboration diagram for pyclustering.nnet.hysteresis.hysteresis_network:

Public Member Functions

def outputs (self)
 Returns current outputs of neurons. More...
 
def outputs (self, values)
 Sets outputs of neurons.
 
def states (self)
 Return current states of neurons. More...
 
def states (self, values)
 Set current states of neurons.
 
def __init__ (self, num_osc, own_weight=-4, neigh_weight=-1, type_conn=conn_type.ALL_TO_ALL, type_conn_represent=conn_represent.MATRIX)
 Constructor of hysteresis oscillatory network. More...
 
def simulate (self, steps, time, solution=solve_type.RK4, collect_dynamic=True)
 Performs static simulation of hysteresis oscillatory network. More...
 
def simulate_static (self, steps, time, solution=solve_type.RK4, collect_dynamic=False)
 Performs static simulation of hysteresis 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 __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 __len__ (self)
 Returns size of the network that is defined by amount of 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

Hysteresis oscillatory network that uses relaxation oscillators that are represented by objective hysteresis neurons whose output in range [-1, +1].

Examples:

# create hysteresis oscillatory network with 5 oscillators.
network = hysteresis_network(5);
# set initial states (from range [-1, +1]).
network.states = [1 0 1 0 1];
# set initial outputs.
network.outputs = [1 1 1 1 1];
# perform simulation of the network during 1000 steps in 10 time units.
output_dynamic = network.simulate(1000, 10);
# show output dynamic of the network.
hysteresis_visualizer.show_output_dynamic(output_dynamic);
# obtain synchronous ensembles.
ensembles = output_dynamic.allocate_sync_ensembles(tolerance = 0.5, threshold_steps = 5);
print(ensembles);

Definition at line 152 of file hysteresis.py.

Constructor & Destructor Documentation

◆ __init__()

def pyclustering.nnet.hysteresis.hysteresis_network.__init__ (   self,
  num_osc,
  own_weight = -4,
  neigh_weight = -1,
  type_conn = conn_type.ALL_TO_ALL,
  type_conn_represent = conn_represent.MATRIX 
)

Constructor of hysteresis oscillatory network.

Parameters
[in]num_osc(uint): Number of oscillators in the network.
[in]own_weight(double): Weight of connection from oscillator to itself - own weight.
[in]neigh_weight(double): Weight of connection between oscillators.
[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.

Definition at line 222 of file hysteresis.py.

Member Function Documentation

◆ outputs()

def pyclustering.nnet.hysteresis.hysteresis_network.outputs (   self)

Returns current outputs of neurons.

Returns
(list) Current outputs of neurons.

Definition at line 181 of file hysteresis.py.

Referenced by pyclustering.nnet.hysteresis.hysteresis_network.outputs().

◆ simulate()

def pyclustering.nnet.hysteresis.hysteresis_network.simulate (   self,
  steps,
  time,
  solution = solve_type.RK4,
  collect_dynamic = True 
)

Performs static simulation of hysteresis oscillatory network.

Parameters
[in]steps(uint): Number steps of simulations during simulation.
[in]time(double): Time of simulation.
[in]solution(solve_type): Type of solution (solving).
[in]collect_dynamic(bool): If True - returns whole dynamic of oscillatory network, otherwise returns only last values of dynamics.
Returns
(hysteresis_dynamic) 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 282 of file hysteresis.py.

Referenced by pyclustering.gcolor.hysteresis.hysteresisgcolor.process().

◆ simulate_static()

def pyclustering.nnet.hysteresis.hysteresis_network.simulate_static (   self,
  steps,
  time,
  solution = solve_type.RK4,
  collect_dynamic = False 
)

Performs static simulation of hysteresis oscillatory network.

Parameters
[in]steps(uint): Number steps of simulations during simulation.
[in]time(double): Time of simulation.
[in]solution(solve_type): Type of solution (solving).
[in]collect_dynamic(bool): If True - returns whole dynamic of oscillatory network, otherwise returns only last values of dynamics.
Returns
(hysteresis_dynamic) 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 298 of file hysteresis.py.

Referenced by pyclustering.nnet.hysteresis.hysteresis_network.simulate(), pyclustering.nnet.syncpr.syncpr.simulate(), and pyclustering.nnet.sync.sync_network.simulate().

◆ states()

def pyclustering.nnet.hysteresis.hysteresis_network.states (   self)

Return current states of neurons.

Returns
(list) States of neurons.

Definition at line 202 of file hysteresis.py.

Referenced by pyclustering.nnet.hysteresis.hysteresis_network.states().


The documentation for this class was generated from the following file: