added non-bootstrapped noise ceiling to eval_bootstrap
@@ -56,7 +56,8 @@ def eval_fixed(model, data, theta=None, method='cosine'):
def eval_bootstrap(model, data, theta=None, method='cosine', N=1000,
- pattern_descriptor=None, rdm_descriptor=None):
+ pattern_descriptor=None, rdm_descriptor=None,
+ bootstrap_noise_ceil=False):
"""evaluates a model on data
performs bootstrapping to get a sampling distribution
@@ -93,13 +94,18 @@ def eval_bootstrap(model, data, theta=None, method='cosine', N=1000,
pattern_sample)
evaluations[i, j] = np.mean(compare(rdm_pred, sample, method))
j += 1
+ if bootstrap_noise_ceil:
noise_min_sample, noise_max_sample = boot_noise_ceiling(sample,
method=method, rdm_descriptor=rdm_descriptor)
noise_min.append(noise_min_sample)
noise_max.append(noise_max_sample)
if isinstance(model, Model):
evaluations = evaluations.reshape((N,1))
+ if bootstrap_noise_ceil:
noise_ceil = np.array([noise_min, noise_max])
+ else:
+ noise_ceil = np.array(boot_noise_ceiling(data,
+ method=method, rdm_descriptor=rdm_descriptor))
result = Result(model, evaluations, method=method,
cv_method='bootstrap', noise_ceiling=noise_ceil)
return result
