ContextLab / hypertools

A Python toolbox for gaining geometric insights into high-dimensional data
http://hypertools.readthedocs.io/en/latest/
MIT License
1.82k stars 160 forks source link

passing ndims to hypertools.reduce erases all other model params #226

Closed paxtonfitzpatrick closed 4 years ago

paxtonfitzpatrick commented 4 years ago

Setting model-specific params is essentially impossible.

If you pass hypertools.reduce a dictionary of model params along with a model in the reduce argument, and also pass ndims, all options except for the chosen model are erased.

If you try to circumvent this by passing n_components to the params dict and not touching the ndims argument, line 122 in hypertools.reduce causes the function to just return the original data.

https://github.com/ContextLab/hypertools/blob/b76c7ac8061998b560e969ff8e4f4c915088e7a0/hypertools/tools/reduce.py#L127-L152