cymr.operations.p_recall#
- cymr.operations.p_recall(int start, int n_f, int[:] recalls, double[:, :] w_fc_exp, const double[:, :] w_fc_pre, double[:, :] w_cf_exp, const double[:, :] w_cf_pre, double[:, :] w_ff_exp, const double[:, :] w_ff_pre, double[:] f, double[:] f_in, double[:] c, double[:] c_in, int[:, :] c_ind, int[:] exclude, double amin, double[:, :] B, double T, const double[:] p_stop, double[:] p)#
Calculate the likelihood of each recall in a sequence.
- Parameters:
start – Start unit for the item segment to recall from.
n_f – Number of units in the item segment.
recalls – Item indices of recalls in output order.
w_fc_exp – Weight matrix \(\mathbf{M}^{FC}_\mathrm{exp}\).
w_fc_pre – Weight matrix \(\mathbf{M}^{FC}_\mathrm{pre}\).
w_cf_exp – Weight matrix \(\mathbf{M}^{CF}_\mathrm{exp}\).
w_cf_pre – Weight matrix \(\mathbf{M}^{CF}_\mathrm{pre}\).
w_ff_exp – Weight matrix \(\mathbf{M}^{FF}_\mathrm{exp}\).
w_ff_pre – Weight matrix \(\mathbf{M}^{FF}_\mathrm{pre}\).
f – Item representation \(\mathbf{f}\).
f_in – Item activation input \(\mathbf{f}^\mathrm{IN}\).
c – Context state \(\mathbf{c}\).
c_in – Context input \(\mathbf{c}^\mathrm{IN}\).
c_ind – Start and end indices of the context sublayer.
exclude – Vector of item indices to exclude from recall.
amin – Minimum item activation for non-excluded items.
B – \(\beta\) parameter.
T – Temperature parameter of the softmax function.
p_stop – Probability of stopping by output position.
p – Likelihood of each recall and the stopping event.