hypertools icon indicating copy to clipboard operation
hypertools copied to clipboard

sequences of analysis operations

Open jeremymanning opened this issue 8 years ago • 2 comments

we may want a way to support sequences of operations. for example, could we come up with an elegant way of supporting something like:

  • reduce data to n1 dimensions using algorithm 1
  • align data using hyperalignment
  • reduce the aligned data to n2 dimensions using algorithm 2
  • align the result using SRM
  • project the (twice-)aligned data onto 3d using algorithm 3

if we add a preprocess function, we may want to apply multiple preprocessing steps in sequence (e.g. normalize, than binarize, etc.).

jeremymanning avatar Oct 05 '17 18:10 jeremymanning

another thought is to support a convenient syntax for something like:

hyp.plot(hyp.tools.reduce(x, model='TSNE', ndims=10), model='SpectralEmbedding')

Instead, we could support the following syntax:

hyp.plot(x, model=['TSNE', 'SpectralEmbedding'], ndims=[10, 3])

jeremymanning avatar Oct 06 '17 19:10 jeremymanning

Also noting (per discussion with @andrewheusser), we could consider supporting something like

hyp.plot(x, xform=[{'reduce': 'TSNE', 'params': {...}}, {'normalize': 'across'}, {'reduce': 'IncrementalPCA'}, {'normalize': 'within'}, {'align': 'hyperalignment'}, {'reduce': 'SpectralEmbedding'}])

In other words, allow an xform keyword argument that takes a list of dictionaries, each specifying a transformation to apply to the data (in sequence).

We'd also have to modify the DataGeometry.transform function to support this.

Upside: it's more flexible and allows the user to do whatever crazy stuff they want (argues for a democratic approach?) Downside: it's more flexible and allows the user to do crazy stuff, even if it makes no sense (argues for a fascist approach?)

jeremymanning avatar Oct 06 '17 19:10 jeremymanning