Repository navigation
Closed
Labels
Description
A Similarity takes as input assembly1, assembly2 and outputs a Score object.
As of now, there are two kinds of similarities:
- non-parametric, such as the
RDMSimilarity: compute similarity of two assemblies directly - parametric, such as the
NeuralFit: first fit on a training set, then predict on a test set and compute similarity based on the predictions
We also have additional utility on top of the simple case:
- compute the outer-product of combinations of all adjacent dimensions (i.e. dimensions that are not used for the Similarity such as
region). - cross-validate with several folds over a dimension that Similarity is computed over, e.g.
object_nameas part ofpresentation
There are several ways to organize the code around this:
- sub-classing (this is the way it is organized now): there is a parent class
OuterCrossValidationSimilaritythat allSimilarityclasses need to inherit from. This parent class implements (1) and (2) from above and sub-classes only need to implement the simple case. Drawbacks:
1.1 harder to test since all sub-classes drag the parent code with them
1.2 we can't just implementapplyin our sub-classes but need to adjust the method name
1.3 we can't compute similarity without the extra baggage, i.e. everything is always cross-validated - chaining: each
Similarityclass implements exactly one operation inapply. A chain operator then takes all these classes, applies them one after another and outputs only the final result. The result here is a list of assemblies which are then fed into aScoreinSimilarity.__call__. However, I don't know how to represent parametric and non-parametric similarities with this approach (one has tofit,predict,compare_prediction, the other just has tocompare) - extract the computor from
Similarity: all the specialized handling ((1) and (2) from utilities) goes intoSimilaritysub-classes, operation on simplified assemblies goes into aComputorclass. Hard to separate the two though, for instanceSimilaritystill needs to callfit,predictetc.
For now, approach (1) works but after NIPS, I would like to revisit the structuring here.
Activity
mschrimpf commentedon Jun 12, 2018
closed in #58 and #60
fix time_bin naming (level_0/1 -> start/end) (brain-score#53)
integrate model helpers (#380)
integrate model helpers (formerly model_tools) (#381)
Brain-Score 2.0 refactor -- plugin format (#407)
Brain-Score 2.0 refactor -- plugin format (brain-score#407)