cymr.network.Network#
- class cymr.network.Network(f_segment, c_segment)#
Representation of interacting item and context layers.
- Parameters:
f_segment (dict of str: (dict of str: int)) – For each item sublayer, the number of units in each segment.
c_segment (dict of str: (dict of str: int)) – For each context sublayer, the number of units in each segment.
- f_segment#
Number of item units for each segment.
- Type:
dict of str: (dict of str: int)
- c_segment#
Number of context units for each segment.
- Type:
dict of str: (dict of str: int)
- f_ind#
Index of units in the item layer.
- Type:
cymr.network.LayerIndex
- c_ind#
Index of units in the context layer.
- Type:
cymr.network.LayerIndex
- n_f#
Total number of item units.
- Type:
int
- n_c#
Total number of context units.
- Type:
int
- f#
Item layer vector.
- Type:
numpy.array
- c#
Context layer vector.
- Type:
numpy.array
- c_in#
Current input to context.
- Type:
numpy.array
- w_fc_pre#
Pre-experimental weights connecting f to c.
- Type:
numpy.array
- w_fc_exp#
Weights learned during the experiment connecting f to c.
- Type:
numpy.array
- w_cf_pre#
Pre-experimental weights connecting c to f.
- Type:
numpy.array
- w_cf_exp#
Weights learned during the experiment connecting c to f.
- Type:
numpy.array
- w_ff_pre#
Pre-experimental weights connecting f to f.
- Type:
numpy.array
- w_ff_exp#
Weights learned during the experiment connecting f to f.
- Type:
numpy.array
- __init__(f_segment, c_segment)#
Methods
__init__
(f_segment, c_segment)add_pre_weights
(connect, f_segment, ...[, ...])Add pre-experimental weights to a network.
copy
([include, exclude])Copy the network to a new network object.
generate_recall
(segment, sublayers, B, T, p_stop)Generate a sequence of simulated free recall events.
generate_recall_lba
(segment, sublayers, ...)Generate timed free recall using the LBA model.
get_region
(f_segment, c_segment)Return slices for a region.
get_segment
(layer, sublayer, segment)Get indices for a segment.
get_slice
(layer, sublayer, segment)Get a slice for a segment.
get_sublayer
(layer, sublayer)Get indices for a sublayer.
get_sublayers
(layer, sublayers)Get an array of indices for multiple sublayers.
get_unit
(layer, sublayer, segment, unit)Get indices for a unit.
integrate
(item, sublayers, B)Integrate input from the item layer into context.
learn
(connect, item, sublayers, L)Learn an association between the item and context layers.
p_recall
(segment, recalls, sublayers, B, T, ...)Calculate the probability of a specific recall sequence.
plot
([ax])Plot the current state of the network.
present
(item, sublayers, B[, Lfc, Lcf])Present an item and learn context-item associations.
record_recall
(segment, recalls, sublayers, B, T)Simulate a recall sequence and record network states.
record_study
(segment, item_list, sublayers, ...)Study a list of items and record network states.
reset
()Reset network weights and activations to zero.
study
(segment, item_list, sublayers, B, Lfc, Lcf)Study a list of items.
study_distract
(segment, item_list, ...)Study a list of items.
update
(item, sublayers)Update context completely with input from the item layer.