Commits

dan mackinlay committed 3be8d93

more convenient param setting

Comments (0)

Files changed (1)

 def swept_experiment(*args, **kwargs):
     return [e for e in swept_experiment_iterator(*args, **kwargs)]
     
-def swept_experiment_iterator(sweepables=None, base_params=DEFAULT_TRIAL_PARAMS, oversample=10, start_seed=10000, n_pairs=10):
+def swept_experiment_iterator(sweepables=None, base_params=DEFAULT_TRIAL_PARAMS, oversample=10, start_seed=10000, n_pairs=10, **override_params):
+    base_params.update(override_params)
     sweepables = sweepables or {} #cast to empty dict
     swept_names = sweepables.keys()
     swept_iterables = [sweepables[name] for name in swept_names]
     # stacked_vels = np.dstack([b.vels for b in branches])
     #In fact, do we really need multiple axes of info for vels? Nah.
     stacked_vels = np.vstack([b.vels[:,0] for b in branches])
-    n_agents = stacked_vels.shape[0]
+    n_agents = stacked_vels.shape[1]
     # Now, we estimate distributions of projected velocity in order to, in turn, estimate mean
     # mutual information.
     ests = np.zeros(n_pairs)