Calculate the Cross-Temporal RDM

neurora.ctrdm_cal module

a module for calculating the cross-temporal RDM based on EEG-like data

neurora.ctrdm_cal.ctRDM(data, sub_opt=1, chl_opt=0, time_win=5, time_step=5)

Calculate CTRDMs for EEG-like data

Parameters
  • data (array) – EEG/MEG data from a time-window. The shape of data must be [n_cons, n_subs, n_chls, n_ts]. n_cons, n_subs, n_chls & n_ts represent the number of conditions, the number of subjects, the number of channels and the number of time-points, respectively.

  • sub_opt (int 0 or 1. Default is 1.) – Return the subject-result or average-result. If sub_opt=0, return the average result. If sub_opt=1, return the results of each subject.

  • chl_opt (int 0 or 1. Default is 0.) – Caculate the CTRDMs for each channel or not. If chl_opt=1, calculate the CTRDMs for each channel. If chl_opt=0, calculate the CTRDMs after averaging the channels.

  • time_win (int. Default is 5.) – Set a time-window for calculating the CTRDM for different time-points. If time_win=10, that means each calculation process based on 10 time-points.

  • time_step (int. Default is 5.) – The time step size for each time of calculating.

Returns

CTRDMs – Cross-Temporal RDMs. if chl_opt=1, the shape of CTRDMs is [n_subs, n_chls, int((n_ts-time_win)/time_step)+1, int((n_ts-time_win)/time_step)+1, n_cons, n_cons] if chl_opt=0, the shape of CTRDMs is [n_subs, int((n_ts-time_win)/time_step)+1, int((n_ts-time_win)/time_step)+1, n_cons, n_cons]

Return type

array