rsatoolbox.inference.boot_testset module

boostrap-testset evaluation methods variants of taking a bootstrap sample and taking the unsampled patterns as a testset

rsatoolbox.inference.boot_testset.bootstrap_testset(models, data, method='cosine', fitter=None, N=1000, pattern_descriptor=None, rdm_descriptor=None)[source]

takes a bootstrap sample and evaluates on the rdms and patterns not sampled also returns the size of each test_set to allow later weighting or selection if this is desired.

Parameters:
  • models (rsatoolbox.model.Model) – Models to be evaluated

  • data (rsatoolbox.rdm.RDMs) – RDM data to use

  • method (string) – comparison method to use

  • fitter (function) – fitting function

  • pattern_descriptor (string) – descriptor to group patterns

  • rdm_descriptor (string) – descriptor to group rdms

Returns:

vector of evaluations of length N numpy.ndarray: n_rdm for each test_set numpy.ndarray: n_pattern for each test_set

Return type:

numpy.ndarray

rsatoolbox.inference.boot_testset.bootstrap_testset_pattern(models, data, method='cosine', fitter=None, N=1000, pattern_descriptor=None)[source]

takes a bootstrap sample and evaluates on the patterns not sampled also returns the size of each test_set to allow later weighting or selection if this is desired.

Parameters:
  • models (rsatoolbox.model.Model) – Model to be evaluated

  • datat (rsatoolbox.rdm.RDMs) – RDM data to use

  • method (string) – comparison method to use

  • fitter (function) – fitting function for the model

  • pattern_descriptor (string) – descriptor to group patterns

Returns:

vector of evaluations of length numpy.ndarray: n_pattern for each test_set

Return type:

numpy.ndarray

rsatoolbox.inference.boot_testset.bootstrap_testset_rdm(models, data, method='cosine', fitter=None, N=1000, rdm_descriptor=None)[source]

takes a bootstrap sample and evaluates on the patterns not sampled also returns the size of each test_set to allow later weighting or selection if this is desired.

Parameters:
  • model (rsatoolbox.model.Model) – Model to be evaluated

  • datat (rsatoolbox.rdm.RDMs) – RDM data to use

  • method (string) – comparison method to use

  • fitter (function) – fitting function for the model

  • pattern_descriptor (string) – descriptor to group patterns

Returns:

vector of evaluations of length numpy.ndarray: n_pattern for each test_set

Return type:

numpy.ndarray