Combiner¶
- class biophysics_fitting.combiner.Combiner¶
This class can be used to combine features (usually) computed by an
Evaluatorobject.For a
Simulatorobject s, anEvaluatorobject e, and aCombinerobject c, the typical usecase is:>>> voltage_traces_dict = s.run(params) >>> features = e.evaluate(voltage_traces_dict) >>> combined_features = c.combine(features)Internally, the Combiner iterates over all names of specified combinations. Each combination is specified not only by a name of the combination, but also a list of names of the features that go into that combination. Each list of features is then combined by calling combinefun with that list.
Example
>>> features = {'feature1': 1, 'feature2': 2, 'feature3': 3, 'feature4': 4} >>> c = Combiner() >>> c.setup.append('combination1', ['feature1', 'feature2']) >>> c.setup.append('combination2', ['feature2', 'feature3', 'feature4']) >>> c.setup.combinefun = max >>> combined_features = c.combine(features) >>> combined_features {'combination1': 2, 'combination2': 4}- Attributes:¶
- Methods:¶
combine(features)Combines features that are computed by an Evaluator class.
Documentation unclear, incomplete, broken or wrong? Let us know