lucent.misc package

misc.io

misc.channel_reducer module

Helper for using sklearn.decomposition on high-dimensional tensors.

Provides ChannelReducer, a wrapper around sklearn.decomposition to help them apply to arbitrary rank tensors. It saves lots of annoying reshaping.

class lucent.misc.channel_reducer.ChannelReducer(n_components: Optional[int] = 3, reduction_alg: Optional[Union[str, BaseEstimator]] = 'NMF', **kwargs)

Bases: object

fit(acts)
fit_transform(acts)
transform(acts)

Module contents