stnmf.callbacks.perturbation
- stnmf.callbacks.perturbation(self, i, itor, callback_data, interval=100)
Callback function to apply different perturbations to the modules at certain intervals
Notes
Implemented for subunit recovery with
stnmf.STNMFonly. No otherstnmf.mfclass is supported.Different perturbations are chosen based on random sampling. This should be largely compatible with the random choice implementation of MATLAB.
Examples
The code below applies a random perturbation of the modules every interval iterations.
>>> from stnmf import STNMF >>> from stnmf.callbacks import perturbation >>> stnmf = STNMF(ste, callback=perturbation, ... callback_kwargs=dict(interval=100))