def __call__(self, features, **params): p = ParamOverrides(self, params, allow_extra_keywords=True) self.features = features self._initialize_featureresponses(p) self._measure_responses(p) results = self._collate_results(p) if p.measurement_storage_hook: p.measurement_storage_hook(results) return results
def __call__(self, features, **params): """ Present the given input patterns and collate the responses. Responses are statistics on the distributions of measure for every unit, extracted by functions that are subclasses of DistributionStatisticFn, and could be specified in each feature with the preference_fn parameter, otherwise the default in self.preference_fn is used. """ p = ParamOverrides(self, params, allow_extra_keywords=True) self.features = features self._initialize_featureresponses(p) self._measure_responses(p) results = self._collate_results(p) if p.measurement_storage_hook: p.measurement_storage_hook(results) return results