Skip to content

specifying distance functions #108

@andrewheusser

Description

@andrewheusser

There is an inconsistency with how distance functions for different feature dimensions are handled. When an egg is created, the user can optionally pass a dist_funcs dictionary containing distance functions for each feature. This is used in the clustering analyses (fingerprint, temporal). However, when performing naturalistic analyses, a new distance function is assigned, e.g. egg.analyze('spc', match='best', distance='correlation'). This forces the distance function to be 'correlation' for all features. Some possible resolutions:

  1. keep the distance argument, but default to egg.dist_funcs. if a string or function is passed, assume that all features should use that distance function. if a dictionary of feature:function pairs is passed, use these instead of the functions specified in egg.dist_funcs

  2. get rid of the distance argument in the analyze method (always infer it from the egg.dist_funcs dict).

1 seems like a more flexible solution...by default assumes you want to use egg.dist_funcs, but allow the user to modify the distance functions on the fly. @jeremymanning and @paxtonfitzpatrick , can I get your thoughts on this?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions