timecorr.weighted_timepoint_decoder

timecorr.weighted_timepoint_decoder#

timecorr.weighted_timepoint_decoder(data, nfolds=2, level=0, optimize_levels=None, cfun=<function isfc>, weights_fun=<function laplace_weights>, weights_params={'scale': 100}, combine=<function mean_combine>, rfun=None, opt_init=None)[source]#
Parameters:
  • data – a list of number-of-observations by number-of-features matrices

  • nfolds – number of cross-validation folds (train using out-of-fold data; test using in-fold data)

  • level – integer or list of integers for levels to be evaluated (default:0)

  • cfun – function for transforming the group data (default: isfc)

  • weights_fun – used to compute per-timepoint weights for cfun; default: laplace_weights

  • weights_params – parameters passed to weights_fun; default: laplace_params

  • rfun – function for reducing output (default: None)

Params combine:

function for combining data within each group, or a list of such functions (default: mean_combine)

Returns:

results dictionary with the following keys: ‘rank’: mean percentile rank (across all timepoints and folds) in the

decoding distribution of the true timepoint

’accuracy’: mean percent accuracy (across all timepoints and folds) ‘error’: mean estimation error (across all timepoints and folds) between

the decoded and actual window numbers, expressed as a percentage of the total number of windows