rsatoolbox 0.1.3.dev56__tar.gz → 0.1.4.dev11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/PKG-INFO +1 -1
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/data/dataset.py +1 -16
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/util/inference_util.py +13 -13
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox.egg-info/PKG-INFO +1 -1
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/.bandit +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/.conda/meta.yaml +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/.gitignore +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/.pylintrc +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/.readthedocs.yml +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/AUTHORS +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/CONTRIBUTING.md +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/LICENSE +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/MANIFEST.in +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/README.md +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/codecov.yml +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/pyproject.toml +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/requirements.txt +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/setup.cfg +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/setup.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/__init__.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/cengine/__init__.pxd +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/cengine/__init__.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/cengine/similarity.pyx +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/data/__init__.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/data/base.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/data/computations.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/data/neurodataset.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/data/noise.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/inference/__init__.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/inference/boot_testset.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/inference/bootstrap.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/inference/crossvalsets.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/inference/evaluate.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/inference/noise_ceiling.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/inference/result.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/io/__init__.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/io/hdf5.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/io/meadows.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/io/pandas.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/io/petnames.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/io/pkl.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/model/__init__.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/model/fitter.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/model/model.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/rdm/__init__.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/rdm/calc.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/rdm/calc_unbalanced.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/rdm/combine.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/rdm/compare.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/rdm/pairs.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/rdm/rdms.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/rdm/transform.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/simulation/__init__.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/simulation/sim.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/test.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/util/__init__.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/util/data_utils.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/util/descriptor_utils.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/util/file_io.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/util/matrix.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/util/pooling.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/util/rdm_utils.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/util/searchlight.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/util/vis_utils.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/vis/__init__.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/vis/colors.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/vis/icon.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/vis/model_map.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/vis/model_plot.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/vis/rdm.mplstyle +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/vis/rdm_comparison.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/vis/rdm_plot.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox/vis/scatter_plot.py +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox.egg-info/SOURCES.txt +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox.egg-info/dependency_links.txt +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox.egg-info/requires.txt +0 -0
- {rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox.egg-info/top_level.txt +0 -0
|
@@ -180,7 +180,7 @@ class Dataset(DatasetBase):
|
|
|
180
180
|
|
|
181
181
|
"""
|
|
182
182
|
desc = self.obs_descriptors[by]
|
|
183
|
-
order = np.argsort(desc)
|
|
183
|
+
order = np.argsort(desc, kind='stable')
|
|
184
184
|
self.measurements = self.measurements[order]
|
|
185
185
|
self.obs_descriptors = subset_descriptor(self.obs_descriptors, order)
|
|
186
186
|
|
|
@@ -685,21 +685,6 @@ class TemporalDataset(Dataset):
|
|
|
685
685
|
time_descriptors=time_descriptors)
|
|
686
686
|
return dataset
|
|
687
687
|
|
|
688
|
-
def sort_by(self, by):
|
|
689
|
-
""" sorts the dataset by a given observation descriptor
|
|
690
|
-
|
|
691
|
-
Args:
|
|
692
|
-
by(String): the descriptor by which the dataset shall be sorted
|
|
693
|
-
|
|
694
|
-
Returns:
|
|
695
|
-
---
|
|
696
|
-
|
|
697
|
-
"""
|
|
698
|
-
desc = self.obs_descriptors[by]
|
|
699
|
-
order = np.argsort(desc)
|
|
700
|
-
self.measurements = self.measurements[order]
|
|
701
|
-
self.obs_descriptors = subset_descriptor(self.obs_descriptors, order)
|
|
702
|
-
|
|
703
688
|
def convert_to_dataset(self, by):
|
|
704
689
|
""" converts to Dataset long format.
|
|
705
690
|
time dimension is absorbed into observation dimension
|
|
@@ -205,7 +205,7 @@ def all_tests(
|
|
|
205
205
|
p_pairwise = t_tests(evaluations, diff_var, dof=dof)
|
|
206
206
|
p_zero = t_test_0(evaluations, model_var, dof=dof)
|
|
207
207
|
p_noise = t_test_nc(evaluations, noise_ceil_var[:, 0],
|
|
208
|
-
np.
|
|
208
|
+
np.nanmean(noise_ceil[0]), dof)
|
|
209
209
|
elif test_type == 'bootstrap':
|
|
210
210
|
if len(noise_ceil.shape) > 1:
|
|
211
211
|
noise_lower_bs = noise_ceil[0]
|
|
@@ -217,7 +217,7 @@ def all_tests(
|
|
|
217
217
|
diffs = noise_lower_bs - evaluations
|
|
218
218
|
p_noise = ((diffs <= 0).sum(axis=0) + 1) / evaluations.shape[0]
|
|
219
219
|
elif test_type == 'ranksum':
|
|
220
|
-
noise_c = np.
|
|
220
|
+
noise_c = np.nanmean(noise_ceil[0])
|
|
221
221
|
p_pairwise = ranksum_pair_test(evaluations)
|
|
222
222
|
p_zero = ranksum_value_test(evaluations, 0)
|
|
223
223
|
p_noise = ranksum_value_test(evaluations, noise_c)
|
|
@@ -313,7 +313,7 @@ def nc_tests(evaluations, noise_ceil, test_type='t-test',
|
|
|
313
313
|
"""
|
|
314
314
|
if test_type == 't-test':
|
|
315
315
|
p_noise = t_test_nc(evaluations, noise_ceil_var[:, 0],
|
|
316
|
-
np.
|
|
316
|
+
np.nanmean(noise_ceil[0]), dof)
|
|
317
317
|
elif test_type == 'bootstrap':
|
|
318
318
|
if len(noise_ceil.shape) > 1:
|
|
319
319
|
noise_lower_bs = noise_ceil[0]
|
|
@@ -323,7 +323,7 @@ def nc_tests(evaluations, noise_ceil, test_type='t-test',
|
|
|
323
323
|
diffs = noise_lower_bs - evaluations
|
|
324
324
|
p_noise = ((diffs <= 0).sum(axis=0) + 1) / evaluations.shape[0]
|
|
325
325
|
elif test_type == 'ranksum':
|
|
326
|
-
noise_c = np.
|
|
326
|
+
noise_c = np.nanmean(noise_ceil[0])
|
|
327
327
|
p_noise = ranksum_value_test(evaluations, noise_c)
|
|
328
328
|
else:
|
|
329
329
|
raise ValueError('test_type not recognized.\n'
|
|
@@ -405,7 +405,7 @@ def bootstrap_pair_tests(evaluations):
|
|
|
405
405
|
"""
|
|
406
406
|
proportions = np.zeros((evaluations.shape[1], evaluations.shape[1]))
|
|
407
407
|
while len(evaluations.shape) > 2:
|
|
408
|
-
evaluations = np.
|
|
408
|
+
evaluations = np.nanmean(evaluations, axis=-1)
|
|
409
409
|
for i_model in range(evaluations.shape[1] - 1):
|
|
410
410
|
for j_model in range(i_model + 1, evaluations.shape[1]):
|
|
411
411
|
proportions[i_model, j_model] = np.sum(
|
|
@@ -439,9 +439,9 @@ def t_tests(evaluations, variances, dof=1):
|
|
|
439
439
|
if variances is None:
|
|
440
440
|
raise ValueError('No variance estimates provided for t_test!')
|
|
441
441
|
n_model = evaluations.shape[1]
|
|
442
|
-
evaluations = np.
|
|
442
|
+
evaluations = np.nanmean(evaluations, 0)
|
|
443
443
|
while evaluations.ndim > 1:
|
|
444
|
-
evaluations = np.
|
|
444
|
+
evaluations = np.nanmean(evaluations, axis=-1)
|
|
445
445
|
C = pairwise_contrast(np.arange(n_model))
|
|
446
446
|
diffs = C @ evaluations
|
|
447
447
|
t = diffs / np.sqrt(np.maximum(variances, np.finfo(float).eps))
|
|
@@ -468,9 +468,9 @@ def t_test_0(evaluations, variances, dof=1):
|
|
|
468
468
|
"""
|
|
469
469
|
if variances is None:
|
|
470
470
|
raise ValueError('No variance estimates provided for t_test!')
|
|
471
|
-
evaluations = np.
|
|
471
|
+
evaluations = np.nanmean(evaluations, 0)
|
|
472
472
|
while evaluations.ndim > 1:
|
|
473
|
-
evaluations = np.
|
|
473
|
+
evaluations = np.nanmean(evaluations, axis=-1)
|
|
474
474
|
t = evaluations / np.sqrt(np.maximum(variances, np.finfo(float).eps))
|
|
475
475
|
p = 1 - stats.t.cdf(t, dof)
|
|
476
476
|
return p
|
|
@@ -501,9 +501,9 @@ def t_test_nc(evaluations, variances, noise_ceil, dof=1):
|
|
|
501
501
|
"""
|
|
502
502
|
if variances is None:
|
|
503
503
|
raise ValueError('No variance estimates provided for t_test!')
|
|
504
|
-
evaluations = np.
|
|
504
|
+
evaluations = np.nanmean(evaluations, 0)
|
|
505
505
|
while evaluations.ndim > 1:
|
|
506
|
-
evaluations = np.
|
|
506
|
+
evaluations = np.nanmean(evaluations, axis=-1)
|
|
507
507
|
p = np.empty(len(evaluations))
|
|
508
508
|
for i, eval_i in enumerate(evaluations):
|
|
509
509
|
t = (eval_i - noise_ceil) / np.sqrt(
|
|
@@ -649,9 +649,9 @@ def get_errorbars(model_var, evaluations, dof, error_bars='sem',
|
|
|
649
649
|
(1, n_models)),
|
|
650
650
|
evaluations),
|
|
651
651
|
axis=0)
|
|
652
|
-
perf = np.
|
|
652
|
+
perf = np.nanmean(evaluations, 0)
|
|
653
653
|
while perf.ndim > 1:
|
|
654
|
-
perf = np.
|
|
654
|
+
perf = np.nanmean(perf, -1)
|
|
655
655
|
errorbar_low = -(np.quantile(framed_evals, prop_cut, axis=0)
|
|
656
656
|
- perf)
|
|
657
657
|
errorbar_high = (np.quantile(framed_evals, 1 - prop_cut,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rsatoolbox-0.1.3.dev56 → rsatoolbox-0.1.4.dev11}/src/rsatoolbox.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|