rsatoolbox.inference.result module

Result object definition

class rsatoolbox.inference.result.Result(models, evaluations, method, cv_method, noise_ceiling, variances=None, dof=1)[source]

Bases: object

Result class storing results for a set of models with the models, the results matrix and the noise ceiling

Parameters
  • models (list of rsatoolbox.model.Model) – the evaluated models

  • evaluations (numpy.ndarray) – evaluations of the models over bootstrap/crossvalidation format: bootstrap_samples x models x crossval & others such that np.mean(evaluations[i,j]) is a valid evaluation for the jth model on the ith bootstrap-sample

  • method (String) – the evaluation method

  • cv_method (String) – crossvalidation specification

  • noise_ceiling (numpy.ndarray) – noise ceiling such that np.mean(noise_ceiling[0]) is the lower bound and np.mean(noise_ceiling[1]) is the higher one.

Variables

inputs (as) –

save(filename, file_type='hdf5', overwrite=False)[source]

saves the results into a file.

Parameters
  • filename (String) – path to the file [or opened file]

  • file_type (String) – Type of file to create: hdf5: hdf5 file pkl: pickle file

  • overwrite (Boolean) – overwrites file if it already exists

to_dict()[source]

Converts the RDMs object into a dict, which can be used for saving

Returns

A dictionary with all the information needed

to regenerate the object

Return type

results_dict(dict)

rsatoolbox.inference.result.load_results(filename, file_type=None)[source]

loads a Result object from disc

Parameters

filename (String) – path to the filelocation

rsatoolbox.inference.result.result_from_dict(result_dict)[source]

recreate Results object from dictionary

Parameters

result_dict (dict) – dictionary to regenerate

Returns

the recreated object

Return type

result(Result)